fix(operations.files): type annotation for mode in files.template (#1… #3050
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: Lint & Test | |
| on: | |
| push: | |
| branches: | |
| - 3.x | |
| - 2.x | |
| - 1.x | |
| - 0.x | |
| pull_request: | |
| jobs: | |
| # Linting | |
| # | |
| lint: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "check --diff --unsafe-fixes" | |
| - uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "format --diff" | |
| type-check: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - run: uv sync --group test --no-default-groups | |
| - run: uv run mypy | |
| - run: uv run python scripts/lint_arguments_sync.py | |
| spell-check: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Check spelling | |
| uses: crate-ci/typos@v1.30.3 | |
| unit-test: | |
| needs: | |
| - lint | |
| - type-check | |
| - spell-check | |
| strategy: | |
| matrix: | |
| os: [macos-26, macos-15, macos-14, windows-2025, windows-2022, ubuntu-24.04, ubuntu-22.04] | |
| # Test every OS vs. the default Python version (the newest stable release), and only one for | |
| # supported Python versions below that | |
| python-version: ["3.14"] | |
| include: | |
| - os: ubuntu-24.04 | |
| python-version: "3.13" | |
| - os: ubuntu-24.04 | |
| python-version: "3.12" | |
| - os: ubuntu-24.04 | |
| python-version: "3.11" | |
| - os: ubuntu-24.04 | |
| python-version: "3.10" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - run: uv sync --group test --no-default-groups --python=${{ matrix.python-version }} | |
| - run: uv run pytest --cov --disable-warnings | |
| - name: Upload coverage report to codecov | |
| if: ${{ matrix.os == 'ubuntu-24.04' && matrix.python-version == '3.14' }} | |
| uses: codecov/codecov-action@v5 | |
| # End-to-end tests | |
| # | |
| end-to-end-test: | |
| needs: | |
| - lint | |
| - type-check | |
| - spell-check | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04] | |
| test-name: [local, ssh, docker, podman] | |
| include: | |
| - os: macos-14 | |
| test-name: local | |
| - os: macos-15 | |
| test-name: local | |
| - os: macos-26 | |
| test-name: local | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - run: uv sync --group test --no-default-groups --python=${{ matrix.python-version }} | |
| - run: uv run pytest -m end_to_end_${{ matrix.test-name }} | |
| docs-build: | |
| needs: | |
| - lint | |
| - type-check | |
| - spell-check | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Fetch git tags | |
| run: git fetch --tags origin | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install | |
| run: | | |
| uv sync --group docs --no-default-groups | |
| uv pip install 'jinja2<3.1' | |
| - name: Generate documentation | |
| run: scripts/build-public-docs.sh | |
| env: | |
| PYTHONPATH: '.' | |
| # Finally, single job to check if all completed, for use in protected branch | |
| tests-done: | |
| if: ${{ always() }} | |
| needs: | |
| - lint | |
| - type-check | |
| - spell-check | |
| - unit-test | |
| - end-to-end-test | |
| - docs-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: matrix-org/done-action@v3 | |
| with: | |
| needs: ${{ toJSON(needs) }} |