Skip to content

Commit 6ab74a3

Browse files
committed
Update GitHub Actions
We update things to be a bit more modern: - We rename the file to not be about `nodejs` (because it never really was, that was an implementation detail). - We trigger on all `pull_request_target` events. - We trigger on pushes to the `main` or `joneshf/<something>` branches. - We rename the job from `build` to `test` (because that's what we're actually doing: testing). - We bump the version of `actions/checkout`. - We switch to using `cachix/install-nix-action`. It would be nice to have this stuff cached somewhere, but caching with GitHub Actions plus Nix plus Node.js takes more than a modicum of effort, so we're not going to deal with it.
1 parent 76a910f commit 6ab74a3

2 files changed

Lines changed: 40 additions & 16 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/test.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}
17+
restore-prefixes-first-match: |
18+
nix-${{ runner.os }}-${{ hashFiles('flake.lock') }}-
19+
nix-${{ runner.os }}-
20+
- name: Cache node_modules
21+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
22+
with:
23+
key: node_modules-${{ runner.os }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/package-lock.json') }}
24+
path: "**/node_modules"
25+
restore-keys: |
26+
node_modules-${{ runner.os }}-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-
27+
node_modules-${{ runner.os }}-${{ hashFiles('flake.lock') }}-
28+
node_modules-${{ runner.os }}-
29+
- name: Cache bower_components
30+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
31+
with:
32+
key: bower_components-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('bower.json') }}
33+
path: bower_components
34+
restore-keys: |
35+
bower_components-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/package-lock.json') }}-
36+
bower_components-${{ hashFiles('flake.lock') }}-${{ hashFiles('**/*.nix') }}-
37+
bower_components-${{ hashFiles('flake.lock') }}-
38+
bower_components-
39+
- name: Test
40+
run: nix develop . --command make test

0 commit comments

Comments
 (0)