diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e55d7bf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +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: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v27 + with: + nix_path: nixpkgs=channel:nixos-24.05 + extra_nix_config: | + experimental-features = nix-command flakes + - name: Run tests via Nix + run: nix develop --command make test