name: "Test"
on:
  pull_request:
  push:
jobs:
  tests:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        nixpkgs_channel:
        - nixos-unstable
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v3
      with:
        fetch-depth: 0
    - uses: cachix/install-nix-action@v18
      with:
        nix_path: nixpkgs=channel:${{ matrix.nixpkgs_channel }}
    #- run: nix build
    - run: nix-build -E '(import ./.).defaultPackage.${builtins.currentSystem}'
    #- run: nix flake check
    - run: nix-build -E '(import ./.).checks.${builtins.currentSystem}'
