Merge pull request #105 from matthewfeickert/ci/add-gha-ci #1
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: | |
| pull_request: | |
| branches: | |
| - master | |
| - release/v* | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| # On push events run the CI only on master by default, but run on any branch if the commit message contains '[ci all]' | |
| if: >- | |
| github.event_name != 'push' | |
| || (github.event_name == 'push' && github.ref == 'refs/heads/master') | |
| || (github.event_name == 'push' && github.ref != 'refs/heads/master' && contains(github.event.head_commit.message, '[ci all]')) | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
| include: | |
| # Intel runner | |
| - os: macos-15-intel | |
| python-version: '3.13' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: "recursive" | |
| - 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@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install tox dependencies | |
| run: uv pip install --system tox tox-uv | |
| - name: Test with tox | |
| run: tox -e py |