aboutsummaryrefslogtreecommitdiffhomepage
path: root/.gitea/workflows/nix.yml
blob: 3193db4bdb3ae6570263c43dbcc41c6038e57bd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Nix

on:
  - push
  - pull_request

jobs:
  tests:
    name: NixOS tests
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

      - name: Install Nix
        uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
        with:
          # explicitly enable sandbox
          install_options: --daemon
          extra_nix_config: |
            sandbox = true
            system-features = nixos-test benchmark big-parallel kvm
          enable_kvm: true

      - name: Run tests
        run: |
          nix --print-build-logs --experimental-features 'nix-command flakes' flake check --all-systems
          nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.nixos-tests

      - name: Upload test output
        uses: actions/upload-artifact@v3
        with:
          name: "result"
          path: result/*
          retention-days: 1