Skip to content

Commit acca6cf

Browse files
Update workflow files to be consistent
1 parent 78075c7 commit acca6cf

File tree

2 files changed

+103
-78
lines changed

2 files changed

+103
-78
lines changed

.github/workflows/ci.yaml

Lines changed: 64 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,69 @@
11
name: "CI"
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
env:
9+
NIX_SHELL: nix develop ..# --command
710

811
jobs:
9-
check-linux:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v6
13-
14-
- name: Install Nix
15-
uses: DeterminateSystems/nix-installer-action@v21
16-
17-
- name: Setup Nix cache
18-
uses: DeterminateSystems/magic-nix-cache-action@v13
19-
with:
20-
use-flakehub: false
21-
22-
- name: Cache Spago dependencies
23-
uses: actions/cache@v4
24-
with:
25-
path: |
26-
generate/.spago
27-
generate/output
28-
~/.cache/spago
29-
key: spago-${{ runner.os }}-${{ hashFiles('generate/spago.lock') }}
30-
restore-keys: |
31-
spago-${{ runner.os }}-
32-
33-
- name: Run spago tests
34-
run: |
35-
cd generate
36-
nix develop ..# --command bash -c "npm ci && spago test"
37-
38-
- name: Verify manifests
39-
run: |
40-
cd generate
41-
nix develop ..# --command spago run -p bin -- --verbose verify ../manifests
42-
43-
- name: Run flake checks
44-
run: nix flake check --print-build-logs
45-
46-
check-darwin:
47-
runs-on: macos-latest
48-
steps:
49-
- uses: actions/checkout@v6
50-
51-
- name: Install Nix
52-
uses: DeterminateSystems/nix-installer-action@v21
53-
54-
- name: Setup Nix cache
55-
uses: DeterminateSystems/magic-nix-cache-action@v13
56-
with:
57-
use-flakehub: false
58-
59-
- name: Run flake check
60-
run: nix flake check --print-build-logs
12+
check-linux:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Install Nix
18+
uses: DeterminateSystems/nix-installer-action@v21
19+
20+
- name: Setup Nix cache
21+
uses: DeterminateSystems/magic-nix-cache-action@v13
22+
with:
23+
use-flakehub: false
24+
25+
- name: Cache Spago dependencies
26+
uses: actions/cache@v4
27+
with:
28+
path: |
29+
generate/.spago
30+
generate/output
31+
~/.cache/spago
32+
key: spago-${{ runner.os }}-${{ hashFiles('generate/spago.lock') }}
33+
restore-keys: |
34+
spago-${{ runner.os }}-
35+
36+
- name: Install npm dependencies
37+
run: npm ci
38+
working-directory: generate
39+
40+
- name: Build
41+
run: $NIX_SHELL spago build -p bin
42+
working-directory: generate
43+
44+
- name: Run spago tests
45+
run: $NIX_SHELL spago test
46+
working-directory: generate
47+
48+
- name: Verify manifests
49+
run: $NIX_SHELL spago run -p bin -- --verbose verify ../manifests
50+
working-directory: generate
51+
52+
- name: Run flake checks
53+
run: nix flake check --print-build-logs
54+
55+
check-darwin:
56+
runs-on: macos-latest
57+
steps:
58+
- uses: actions/checkout@v6
59+
60+
- name: Install Nix
61+
uses: DeterminateSystems/nix-installer-action@v21
62+
63+
- name: Setup Nix cache
64+
uses: DeterminateSystems/magic-nix-cache-action@v13
65+
with:
66+
use-flakehub: false
67+
68+
- name: Run flake check
69+
run: nix flake check --print-build-logs
Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,49 @@
1-
# Runs the generate script on a daily basis to look for new tooling updates.
21
name: "daily-update"
32

4-
# The importer is run every day at 07:00 UTC and can also be run manually from
5-
# the 'Actions' tab.
63
on:
7-
workflow_dispatch:
8-
schedule:
9-
- cron: "0 7 * * *"
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 7 * * *"
7+
8+
env:
9+
NIX_SHELL: nix develop ..# --command
1010

1111
jobs:
12-
build:
13-
runs-on: ubuntu-latest
12+
build:
13+
runs-on: ubuntu-latest
14+
env:
15+
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
16+
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- name: Install Nix
21+
uses: DeterminateSystems/nix-installer-action@v21
1422

15-
env:
16-
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
23+
- name: Setup Nix cache
24+
uses: DeterminateSystems/magic-nix-cache-action@v13
25+
with:
26+
use-flakehub: false
1727

18-
steps:
19-
- uses: actions/checkout@v6
28+
- name: Cache Spago dependencies
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
generate/.spago
33+
generate/output
34+
~/.cache/spago
35+
key: spago-${{ runner.os }}-${{ hashFiles('generate/spago.lock') }}
36+
restore-keys: |
37+
spago-${{ runner.os }}-
2038
21-
- name: Install Nix
22-
uses: DeterminateSystems/nix-installer-action@v21
39+
- name: Install npm dependencies
40+
run: npm ci
41+
working-directory: generate
2342

24-
- name: Setup Nix cache
25-
uses: DeterminateSystems/magic-nix-cache-action@v13
26-
with:
27-
use-flakehub: false
43+
- name: Build the generate script
44+
run: $NIX_SHELL spago build -p bin
45+
working-directory: generate
2846

29-
- name: Run the generate script
30-
run: |
31-
cd generate
32-
npm ci
33-
nix develop --command spago run -p bin -- --verbose update ../manifests --commit
47+
- name: Run the generate script
48+
run: $NIX_SHELL spago run -p bin -- --verbose update ../manifests --commit
49+
working-directory: generate

0 commit comments

Comments
 (0)