|
| 1 | +name: Test |
| 2 | + |
| 3 | +on: |
| 4 | + - push |
| 5 | + |
| 6 | +jobs: |
| 7 | + test: |
| 8 | + runs-on: ubuntu-24.04 |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 |
| 11 | + - name: Install Nix |
| 12 | + uses: nixbuild/nix-quick-install-action@63ca48f939ee3b8d835f4126562537df0fee5b91 |
| 13 | + - name: Cache Nix store |
| 14 | + uses: nix-community/cache-nix-action@135667ec418502fa5a3598af6fb9eb733888ce6a |
| 15 | + with: |
| 16 | + # The key includes the os/arch pair since artifacts in the Nix store are platform-specific. |
| 17 | + primary-key: nix-${{ join([runner.os, runner.arch], "_") }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }} |
| 18 | + restore-prefixes-first-match: | |
| 19 | + nix-${{ join([runner.os, runner.arch], "_") }}-${{ hashFiles('flake.lock') }}- |
| 20 | + nix-${{ join([runner.os, runner.arch], "_") }}- |
| 21 | + - name: Cache node_modules |
| 22 | + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 |
| 23 | + with: |
| 24 | + # The key includes the os/arch pair since artifacts in `node_modules` can be platform-specific. |
| 25 | + key: node_modules-${{ join([runner.os, runner.arch], "_") }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/package-lock.json') }} |
| 26 | + path: "**/node_modules" |
| 27 | + restore-keys: | |
| 28 | + node_modules-${{ join([runner.os, runner.arch], "_") }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}- |
| 29 | + node_modules-${{ join([runner.os, runner.arch], "_") }}-${{ hashFiles('flake.lock') }}- |
| 30 | + node_modules-${{ join([runner.os, runner.arch], "_") }}- |
| 31 | + - name: Cache bower_components |
| 32 | + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 |
| 33 | + with: |
| 34 | + key: bower_components-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('bower.json') }} |
| 35 | + path: bower_components |
| 36 | + restore-keys: | |
| 37 | + bower_components-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/package-lock.json') }}- |
| 38 | + bower_components-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}- |
| 39 | + bower_components-${{ hashFiles('flake.lock') }}- |
| 40 | + bower_components- |
| 41 | + - name: Cache output |
| 42 | + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 |
| 43 | + with: |
| 44 | + key: output-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('bower.json') }}-${{ hashFiles('**/*.js', '**/*.purs') }} |
| 45 | + path: output |
| 46 | + restore-keys: | |
| 47 | + output-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('bower.json') }}- |
| 48 | + output-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/package-lock.json') }}- |
| 49 | + output-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}- |
| 50 | + output-${{ hashFiles('flake.lock') }}- |
| 51 | + output- |
| 52 | + - name: Test |
| 53 | + run: nix develop . --command make test |
0 commit comments