[codex] Add typed method alternatives and tested docs #71
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: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| - name: Install dependencies | |
| run: uv sync --dev --group=docs | |
| - name: Ruff format check | |
| run: uv run --dev ruff format --check --diff . | |
| continue-on-error: true | |
| - name: Ruff lint check | |
| run: uv run --dev ruff check . | |
| continue-on-error: true | |
| - name: Pyrefly type check | |
| run: uv run --dev pyrefly check . | |
| - name: Pyright type probe check | |
| run: uv run --dev pyright typing_tests | |
| - name: Mypy type check | |
| run: uv run --dev mypy . | |
| - name: Stubtest runtime typing check | |
| run: uv run --dev stubtest alternative | |
| - name: Run tests | |
| run: | | |
| # Some GitHub-hosted runners export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1. | |
| # Unset it so pytest can discover pytest-cov and pytest-benchmark via entry points, | |
| # which are required by the addopts configured in pyproject.toml. | |
| unset PYTEST_DISABLE_PLUGIN_AUTOLOAD | |
| uv run --dev pytest --verbosity=2 --cov=alternative --cov-report=xml --cov-fail-under=100 --junit-xml=test-results.xml | |
| - name: Documentation warnings treated as errors | |
| run: uv run --group=docs sphinx-build --fail-on-warning --keep-going --builder=html docs /tmp/alternative-docs-html | |
| - name: Upload coverage to Codecov | |
| if: (success() || hashFiles('coverage.xml') != '') && env.CODECOV_TOKEN != '' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ env.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| fail_ci_if_error: true | |
| - name: Upload test results to Codecov | |
| if: (success() || hashFiles('test-results.xml') != '') && env.CODECOV_TOKEN != '' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ env.CODECOV_TOKEN }} | |
| files: ./test-results.xml | |
| report_type: test_results | |
| fail_ci_if_error: true |