[ci] Add test workflow and gate releases on it (#1) #2
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 | |
| # Lint + unit tests. macOS only: tailctl drives a userspace tailscaled on macOS | |
| # and its path resolution assumes Homebrew prefixes. 3.11 and 3.13 bracket the | |
| # requires-python range. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.11', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: python -m pip install --upgrade pip | |
| - run: pip install -e '.[dev]' | |
| - run: ruff check src tests | |
| - run: pytest |