Add cross platform 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: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| tests: | |
| name: Tests on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install make on Windows | |
| if: runner.os == 'Windows' | |
| run: choco install make -y | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Run tests | |
| shell: bash | |
| run: make test | |
| nix-tests: | |
| name: NixOS tests | |
| runs-on: ubuntu-latest | |
| container: | |
| image: nixos/nix:latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run tests in Nix shell | |
| run: nix develop --command python -m unittest discover -v |