Skip to content

chore(deps-dev): bump ruff from 0.6.9 to 0.13.2 #90

chore(deps-dev): bump ruff from 0.6.9 to 0.13.2

chore(deps-dev): bump ruff from 0.6.9 to 0.13.2 #90

Workflow file for this run

name: build
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
workflow_dispatch:
jobs:
python-linux:
name: Python (Linux, ${{ matrix.python-version }})
if: ${{ github.event_name != 'pull_request' || (github.event.pull_request && !github.event.pull_request.draft) }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Poetry
run: |
python -m pip install --upgrade pip
pip install "poetry==1.8.3"
- name: Prepare log dir
run: |
echo "LOG_DIR=$RUNNER_TEMP/logs" >> "$GITHUB_ENV"
mkdir -p "$RUNNER_TEMP/logs"
- name: Install deps
run: poetry install --no-interaction
- name: Ruff
run: poetry run ruff check . --output-format=github | tee -a "$LOG_DIR/ruff.log"
- name: Black check
run: poetry run black --check . | tee -a "$LOG_DIR/black.log"
- name: Pytests
env:
PYTHONPATH: src
run: poetry run pytest -q --disable-warnings | tee -a "$LOG_DIR/pytest.log"
- name: Mypy (src)
run: poetry run mypy src | tee -a "$LOG_DIR/mypy.log"
- name: Smoke import
run: poetry run python -c "import star_template; print('py-smoke-ok')" | tee -a "$LOG_DIR/smoke.log"
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: python-${{ matrix.python-version }}-logs
path: ${{ env.LOG_DIR }}
if-no-files-found: ignore
retention-days: 7
node-linux:
name: Node (Linux)
if: ${{ github.event_name != 'pull_request' || (github.event.pull_request && !github.event.pull_request.draft) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Prepare log dir
run: |
echo "LOG_DIR=$RUNNER_TEMP/node-logs" >> "$GITHUB_ENV"
mkdir -p "$RUNNER_TEMP/node-logs"
- run: sudo apt-get update && sudo apt-get install -y jq
- run: npm ci --silent | tee -a "$LOG_DIR/npm-ci.log"
- run: npx eslint . --max-warnings=0 | tee -a "$LOG_DIR/eslint.log"
- run: npx prettier -c . --ignore-unknown | tee -a "$LOG_DIR/prettier.log"
- name: Type-check
run: |
if [ -f tsconfig.json ]; then
npx tsc -p tsconfig.json --noEmit | tee -a "$LOG_DIR/tsc.log"
else
echo "No TS" | tee -a "$LOG_DIR/tsc.log"
fi
- name: Tests
run: |
if jq -re '.scripts.test' package.json >/dev/null 2>&1; then
npm test | tee -a "$LOG_DIR/tests.log"
else
echo "No Node tests" | tee -a "$LOG_DIR/tests.log"
fi
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: node-logs
path: ${{ env.LOG_DIR }}
if-no-files-found: ignore
retention-days: 7