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