|
9 | 9 | permissions: |
10 | 10 | contents: read |
11 | 11 |
|
12 | | -env: |
13 | | - GO_VERSION: "1.24.x" |
14 | | - GO_CACHE_KEY: efa04b89c1b1 |
15 | | - |
16 | 12 | jobs: |
17 | 13 |
|
18 | 14 | Static-Analysis: |
| 15 | + # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline |
19 | 16 | name: "Static analysis" |
20 | 17 | runs-on: ubuntu-24.04 |
21 | | - permissions: |
22 | | - contents: read |
23 | 18 | steps: |
24 | | - - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 |
25 | | - with: |
26 | | - go-version: ${{ env.GO_VERSION }} |
27 | | - |
28 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
29 | | - with: |
30 | | - persist-credentials: false |
31 | | - |
32 | | - - name: Restore tool cache |
33 | | - id: tool-cache |
34 | | - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 |
35 | | - with: |
36 | | - path: ${{ github.workspace }}/.tmp |
37 | | - key: ${{ runner.os }}-tool-${{ hashFiles('Makefile') }} |
38 | | - |
39 | | - - name: Restore go cache |
40 | | - id: go-cache |
41 | | - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 |
42 | | - with: |
43 | | - path: ~/go/pkg/mod |
44 | | - key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ env.GO_CACHE_KEY }}-${{ hashFiles('**/go.sum') }} |
45 | | - restore-keys: | |
46 | | - ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ env.GO_CACHE_KEY }}- |
47 | | -
|
48 | | - - name: (cache-miss) Bootstrap all project dependencies |
49 | | - if: steps.tool-cache.outputs.cache-hit != 'true' || steps.go-cache.outputs.cache-hit != 'true' |
50 | | - run: make bootstrap |
| 19 | + # setup checkout, go, go-make, binny, and cache go modules |
| 20 | + - uses: anchore/go-make/.github/actions/setup@1747ccaf5ab9a24fc6beaff2c4665007fe656462 # dev branch! |
51 | 21 |
|
52 | 22 | - name: Run static analysis |
53 | 23 | run: make static-analysis |
54 | 24 |
|
55 | 25 | Unit-Test: |
| 26 | + # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline |
56 | 27 | name: "Unit tests" |
57 | 28 | runs-on: ubuntu-24.04 |
58 | | - permissions: |
59 | | - contents: read |
60 | 29 | steps: |
61 | | - - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 |
62 | | - with: |
63 | | - go-version: ${{ env.GO_VERSION }} |
64 | | - |
65 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
66 | | - with: |
67 | | - persist-credentials: false |
68 | | - |
69 | | - - name: Restore tool cache |
70 | | - id: tool-cache |
71 | | - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 |
72 | | - with: |
73 | | - path: ${{ github.workspace }}/.tmp |
74 | | - key: ${{ runner.os }}-tool-${{ hashFiles('Makefile') }} |
75 | | - |
76 | | - - name: Restore go cache |
77 | | - id: go-cache |
78 | | - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 |
79 | | - with: |
80 | | - path: ~/go/pkg/mod |
81 | | - key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ env.GO_CACHE_KEY }}-${{ hashFiles('**/go.sum') }} |
82 | | - restore-keys: | |
83 | | - ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ env.GO_CACHE_KEY }}- |
84 | | -
|
85 | | - - name: (cache-miss) Bootstrap all project dependencies |
86 | | - if: steps.tool-cache.outputs.cache-hit != 'true' || steps.go-cache.outputs.cache-hit != 'true' |
87 | | - run: make bootstrap |
| 30 | + # setup checkout, go, go-make, binny, and cache go modules |
| 31 | + - uses: anchore/go-make/.github/actions/setup@1747ccaf5ab9a24fc6beaff2c4665007fe656462 # dev branch! |
88 | 32 |
|
89 | 33 | - name: Run unit tests |
90 | 34 | run: make unit |
0 commit comments