|
1 | 1 | name: "CI" |
2 | 2 |
|
3 | 3 | 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 |
7 | 10 |
|
8 | 11 | 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 |
0 commit comments