From 5ad42ebfb3a26997aa5741e87df607baa39336b8 Mon Sep 17 00:00:00 2001 From: Eduard Bopp Date: Tue, 26 Jan 2021 13:26:28 +0100 Subject: [PATCH] Add flake-based GitHub Actions workflow --- .github/workflows/test-flakes.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/test-flakes.yml diff --git a/.github/workflows/test-flakes.yml b/.github/workflows/test-flakes.yml new file mode 100644 index 0000000..faf1157 --- /dev/null +++ b/.github/workflows/test-flakes.yml @@ -0,0 +1,31 @@ +name: "Flake test" +on: + pull_request: + schedule: + - cron: '51 2 * * *' +jobs: + tests: + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + # Nix Flakes doesn't work on shallow clones + fetch-depth: 0 + - uses: cachix/install-nix-action@v12 + with: + install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install + extra_nix_config: | + experimental-features = nix-command flakes + system-features = nixos-test benchmark big-parallel kvm + - name: Setup cachix + uses: cachix/cachix-action@v8 + with: + name: mic92 + signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' + - name: List flake structure + run: nix flake show + - name: Run unit tests (flake) + run: nix build --no-link .#unit-tests -L