diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b645c0c..297999f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,13 +14,38 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 + - name: "Check out source code" + uses: actions/checkout@v6 + - name: "Install Python" + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - - uses: astral-sh/setup-uv@v7 + - name: "Install uv" + uses: astral-sh/setup-uv@v7 with: enable-cache: true - - name: Lint + - name: "Run tests" + run: ant test + + lint: + runs-on: ubuntu-latest + # Disable pre-commit check on the master branch to prevent + # pull request merges to fail with don't commit to branch. + if: github.ref != 'refs/heads/master' + steps: + - name: "Check out source code" + uses: actions/checkout@v6 + - name: "Install Python" + uses: actions/setup-python@v6 + with: + python-version: "3.14" + - name: "Install uv" + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + # NOTE Using the "latest" version of uv is risky, but for the time being uv is updated + # regularly, so a specific version would be outdated rather quickly. Once uv goes + # version 1.0, this should be changed to something like ">=1 <2". + version: "latest" + - name: "Run pre-commit checks" uses: pre-commit/action@v3.0.1 - - run: ant test