build #208
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: build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release** | |
| paths-ignore: | |
| - "**.md" | |
| pull_request: | |
| paths-ignore: | |
| - "**.md" | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 6 * * 1" | |
| # This will cancel previous run if a newer job that obsoletes the said previous | |
| # run, is started. | |
| # Based on https://github.com/zulip/zulip/commit/4a11642cee3c8aec976d305d51a86e60e5d70522 | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }}-latest | |
| strategy: | |
| fail-fast: False | |
| matrix: | |
| os: [windows, ubuntu, macos] | |
| python-version: ["3.14"] | |
| pip-pre: [""] | |
| include: | |
| - os: ubuntu | |
| python-version: "3.13" | |
| - os: ubuntu | |
| python-version: "3.12" | |
| - os: ubuntu | |
| python-version: "3.14" | |
| pip-pre: "--pre" | |
| # Disabled for now. See https://github.com/mesa/mesa/issues/1253 | |
| #- os: ubuntu | |
| # python-version: 'pypy-3.8' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| cache: "pip" | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install Mesa and dependencies | |
| run: uv pip install --system .[dev] ${{ matrix.pip-pre }} | |
| - name: Setup Playwright | |
| run: playwright install chromium-headless-shell | |
| - name: Test with pytest | |
| run: pytest --durations=10 tests/ -Werror -Wdefault::PendingDeprecationWarning | |
| coverage: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 6 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - run: pip install uv | |
| - run: uv pip install --system .[dev] | |
| - run: playwright install chromium-headless-shell | |
| - run: python -Im pytest -p pytest_cov --cov --cov-report=xml --cov-report=markdown-append:"${GITHUB_STEP_SUMMARY}" --cov-context=test tests/ | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| examples: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| allow-prereleases: true | |
| cache: "pip" | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install Mesa | |
| run: uv pip install --system .[examples] | |
| - name: Checkout mesa-examples | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: mesa/mesa-examples | |
| path: mesa-examples | |
| - name: Test examples | |
| run: | | |
| cd mesa-examples | |
| pytest -rA -Werror -Wdefault::PendingDeprecationWarning test_examples.py |