Scicek/test #577
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| pull_request: | |
| branches: [master] | |
| push: | |
| branches: [master] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| # default checkout for builds | |
| - uses: actions/checkout@v5 | |
| # switch to PR head only when we need to commit uv.lock (Dependabot PRs) | |
| - name: Checkout PR head (Dependabot only) | |
| if: | |
| github.event_name == 'pull_request' && github.actor == | |
| 'dependabot[bot]' | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| fetch-depth: 0 | |
| - name: Install uv and Python | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| # refresh lock only for Dependabot PRs; keep going even if push is blocked | |
| - name: Refresh uv.lock (Dependabot only) | |
| if: | |
| github.event_name == 'pull_request' && github.actor == | |
| 'dependabot[bot]' | |
| run: | | |
| uv lock | |
| if ! git diff --quiet -- uv.lock; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add uv.lock | |
| git commit -m "chore: refresh uv.lock" | |
| git push || echo "push skipped (no perms)" | |
| fi | |
| - name: Install dependencies | |
| run: uv sync --locked --only-dev | |
| - name: Run Prettier | |
| uses: creyD/[email protected] | |
| with: | |
| dry: true | |
| prettier_options: "--check **/*.{json,yaml,yml,md}" | |
| - name: Run Tox | |
| run: uv run tox -e py,lint |