Unify focus and localisation indexes (#117) #181
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| # Never cancel a main run: back-to-back merges would leave the earlier | |
| # commit with no completed check. | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # actions/checkout v4.4.0 | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 | |
| with: | |
| persist-credentials: false | |
| # actions/setup-python v5.6.0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - run: pip install -e '.[dev]' | |
| - run: ruff check . | |
| - run: ruff format --check . | |
| - run: mypy | |
| # actionlint auto-discovers .github/actionlint.yaml. | |
| # rhysd/actionlint v1.7.12 | |
| - name: Lint workflow files | |
| uses: rhysd/actionlint@914e7df21a07ef503a81201c76d2b11c789d3fca | |
| test: | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.14"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| # actions/checkout v4.4.0 | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 | |
| with: | |
| persist-credentials: false | |
| # actions/setup-python v5.6.0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - run: pip install -e '.[dev]' | |
| - run: pytest -q -n auto | |
| coverage: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| # actions/checkout v4.4.0 | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| # actions/setup-python v5.6.0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - run: pip install -e '.[dev]' | |
| - run: coverage run --source=src -m pytest -q | |
| - run: coverage report | |
| - run: coverage xml | |
| - run: >- | |
| diff-cover coverage.xml --compare-branch=origin/main --fail-under=85 |