Update Python and pre-commit dependencies #649
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 | |
| env: | |
| # Current supported uv version. The uv documentation recommends pinning | |
| # this. The version should match the version used in .pre-commit-config.yaml | |
| # and frozen in uv.lock. | |
| UV_VERSION: "0.10.5" | |
| "on": | |
| merge_group: {} | |
| pull_request: {} | |
| push: | |
| branches-ignore: | |
| # These should always correspond to pull requests, so ignore them for | |
| # the push trigger and let them be triggered by the pull_request | |
| # trigger, avoiding running the workflow twice. This is a minor | |
| # optimization so there's no need to ensure this is comprehensive. | |
| - "dependabot/**" | |
| - "gh-readonly-queue/**" | |
| - "renovate/**" | |
| - "t/**" | |
| - "tickets/**" | |
| - "u/**" | |
| release: | |
| types: [published] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: lint | |
| run: uv run --only-group=tox tox run -e lint | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Run tox | |
| run: uv run --only-group=tox tox run -e py,coverage-report,typing | |
| build: | |
| needs: [test] | |
| secrets: inherit | |
| uses: lsst-sqre/multiplatform-build-and-push/.github/workflows/build.yaml@v3 | |
| with: | |
| images: ghcr.io/${{ github.repository }} | |
| # Only do Docker builds of tagged releases and pull requests from ticket | |
| # branches. This will still trigger on pull requests from untrusted | |
| # repositories whose branch names match our tickets/* branch convention, | |
| # but in this case the build will fail with an error since the secret | |
| # won't be set. | |
| if: > | |
| (github.event_name == 'release' && github.event.action == 'published') | |
| || (github.event_name != 'merge_group' | |
| && (startsWith(github.head_ref, 'tickets/') | |
| || startsWith(github.head_ref, 't/'))) |