|
5 | 5 | push: |
6 | 6 | branches: [main] |
7 | 7 | env: |
8 | | - CI_NIX_STORE: ~/nix |
9 | 8 | CI_NIX_FLAKE: .#default |
10 | 9 | jobs: |
11 | 10 | lint: |
12 | 11 | runs-on: ubuntu-latest |
13 | 12 | steps: |
14 | 13 | - name: Checkout |
15 | | - uses: actions/checkout@v3 |
| 14 | + uses: actions/checkout@v4 |
16 | 15 | - name: Setup Nix |
17 | | - uses: cachix/install-nix-action@v20 |
| 16 | + uses: DeterminateSystems/nix-installer-action@main |
18 | 17 | - name: Cache Nix |
19 | | - uses: actions/cache@v3 |
20 | | - with: |
21 | | - path: ${{ env.CI_NIX_STORE }} |
22 | | - key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }} |
| 18 | + uses: DeterminateSystems/magic-nix-cache-action@main |
23 | 19 | - name: Lint |
24 | 20 | run: | |
25 | | - nix --store ${{ env.CI_NIX_STORE }} \ |
26 | | - develop ${{ env.CI_NIX_FLAKE }} --command \ |
| 21 | + nix develop ${{ env.CI_NIX_FLAKE }} --command \ |
27 | 22 | editorconfig-checker && echo "ok" |
28 | | -
|
29 | 23 | test: |
30 | 24 | runs-on: ubuntu-latest |
31 | 25 | steps: |
32 | 26 | - name: Checkout |
33 | | - uses: actions/checkout@v3 |
| 27 | + uses: actions/checkout@v4 |
34 | 28 | - name: Setup Nix |
35 | | - uses: cachix/install-nix-action@v20 |
| 29 | + uses: DeterminateSystems/nix-installer-action@main |
36 | 30 | - name: Cache Nix |
37 | | - uses: actions/cache@v3 |
38 | | - with: |
39 | | - path: ${{ env.CI_NIX_STORE }} |
40 | | - key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }} |
| 31 | + uses: DeterminateSystems/magic-nix-cache-action@main |
41 | 32 | - name: Cache Go |
42 | | - uses: actions/cache@v3 |
| 33 | + uses: actions/cache@v4 |
43 | 34 | with: |
44 | 35 | key: ${{ runner.os }}-go-${{ hashfiles('go.mod', 'go.sum') }} |
45 | 36 | path: | |
46 | 37 | ~/.cache/go-build |
47 | 38 | ~/go/pkg/mod |
48 | 39 | - name: Test |
49 | 40 | run: | |
50 | | - nix --store ${{ env.CI_NIX_STORE }} \ |
51 | | - develop ${{ env.CI_NIX_FLAKE }} --command \ |
52 | | - go test -v -short -cover -race ./... |
| 41 | + nix develop ${{ env.CI_NIX_FLAKE }} --command \ |
| 42 | + go test -v -cover -race ./... |
0 commit comments