name: "Test"
on:
  pull_request:
  push:
    branches:
      - master
jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        # when updating channels, also update .mergify.yml
        channel: [ nixos-unstable, nixos-24.05 ]
    steps:
    - uses: actions/checkout@v4
    - uses: cachix/install-nix-action@V27
      with:
        nix_path: nixpkgs=channel:${{ matrix.channel }}
    - name: Show nixpkgs version
      run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
    - run: ./tests/run.py