[pre-commit.ci] pre-commit autoupdate #873
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 Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "release**" | |
| paths-ignore: | |
| - "**.md" | |
| pull_request: | |
| paths-ignore: | |
| - "**.md" | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 6 * * 1" | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }}-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows, ubuntu, macos] | |
| python-version: ["3.13"] | |
| pip-pre: [""] | |
| include: | |
| - os: ubuntu | |
| python-version: "3.12" | |
| - os: ubuntu | |
| python-version: "3.11" | |
| - os: ubuntu | |
| python-version: "3.13" | |
| pip-pre: "--pre" | |
| env: | |
| MESA_FRAMES_RUNTIME_TYPECHECKING: "true" | |
| POSTGRES_URI: postgresql://user:password@localhost:5432/testdb | |
| services: | |
| postgres: | |
| image: ${{ matrix.os == 'ubuntu' && 'postgres:15' || '' }} | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_USER: user | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: testdb | |
| options: >- | |
| --health-cmd="pg_isready" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| 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 via GitHub Action | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install mesa-frames and dependencies | |
| run: | | |
| uv pip install --system . ${{ matrix.pip-pre }} | |
| uv pip install --group dev --system | |
| - name: Install and Start PostgreSQL (macOS) | |
| if: matrix.os == 'macos' | |
| run: | | |
| brew install postgresql@15 | |
| export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH" | |
| export PGDATA="/opt/homebrew/var/postgresql@15" | |
| rm -rf $PGDATA | |
| mkdir -p $PGDATA | |
| initdb --username=user --auth=trust --encoding=UTF8 $PGDATA | |
| pg_ctl -D $PGDATA -l logfile start | |
| sleep 5 | |
| createdb testdb -U user | |
| - name: Set SKIP_PG_TESTS for Windows | |
| if: matrix.os == 'windows' | |
| run: echo "SKIP_PG_TESTS=true" >> $env:GITHUB_ENV | |
| - name: Test with pytest | |
| run: pytest --durations=10 --cov=mesa_frames tests/ --cov-report=xml | |
| - if: matrix.os == 'ubuntu' | |
| name: Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} |