|
4 | 4 | - pull_request |
5 | 5 |
|
6 | 6 | env: |
7 | | - GO_VERSION: "oldstable" |
8 | | - |
9 | 7 | GO_BUILD_CMD: 'go build "-ldflags=-s -w" -trimpath' |
10 | 8 | GO_BUILD_TEST_CMD: "go test -mod=mod -gcflags=all=-d=checkptr -c -tags functional" |
11 | 9 |
|
|
29 | 27 | with: |
30 | 28 | show-progress: false |
31 | 29 |
|
32 | | - - name: Install go |
33 | | - uses: actions/setup-go@v5 |
| 30 | + - name: Install Go |
| 31 | + uses: ./.github/actions/setup-go |
34 | 32 | with: |
35 | | - go-version: ${{ env.GO_VERSION }} |
36 | 33 | # sometimes go cache causes issues when linting |
37 | 34 | cache: false |
38 | 35 |
|
@@ -67,21 +64,11 @@ jobs: |
67 | 64 | path: "${{ github.workspace }}/go/src/github.com/Microsoft/hcsshim" |
68 | 65 | show-progress: false |
69 | 66 |
|
70 | | - - name: Install go |
71 | | - uses: actions/setup-go@v5 |
| 67 | + - name: Install Go |
| 68 | + uses: ./go/src/github.com/Microsoft/hcsshim/.github/actions/setup-go |
72 | 69 | with: |
73 | | - go-version: ${{ env.GO_VERSION }} |
74 | | - cache-dependency-path: | |
75 | | - ${{ github.workspace }}/go/src/github.com/Microsoft/hcsshim/go.sum |
76 | | - ${{ github.workspace }}/go/src/github.com/Microsoft/hcsshim/test/go.sum |
77 | | -
|
78 | | - - name: Pre-fill Module Cache |
79 | | - shell: powershell |
80 | | - run: | |
81 | | - go mod download |
82 | | - cd test |
83 | | - go mod download |
84 | | - working-directory: "${{ github.workspace }}/go/src/github.com/Microsoft/hcsshim" |
| 70 | + repo-path: ${{ github.workspace }}/go/src/github.com/Microsoft/hcsshim |
| 71 | + fill-module-cache: true |
85 | 72 |
|
86 | 73 | - name: Install protoc |
87 | 74 | shell: powershell |
@@ -134,20 +121,10 @@ jobs: |
134 | 121 | with: |
135 | 122 | show-progress: false |
136 | 123 |
|
137 | | - - name: Install go |
138 | | - uses: actions/setup-go@v5 |
| 124 | + - name: Install Go |
| 125 | + uses: ./.github/actions/setup-go |
139 | 126 | with: |
140 | | - go-version: ${{ env.GO_VERSION }} |
141 | | - cache-dependency-path: | |
142 | | - go.sum |
143 | | - test/go.sum |
144 | | -
|
145 | | - - name: Pre-fill Module Cache |
146 | | - shell: powershell |
147 | | - run: | |
148 | | - go mod download |
149 | | - cd test |
150 | | - go mod download |
| 127 | + fill-module-cache: true |
151 | 128 |
|
152 | 129 | - name: Validate go.mod and vendoring |
153 | 130 | shell: powershell |
@@ -209,20 +186,10 @@ jobs: |
209 | 186 | with: |
210 | 187 | show-progress: false |
211 | 188 |
|
212 | | - - name: Install go |
213 | | - uses: actions/setup-go@v5 |
| 189 | + - name: Install Go |
| 190 | + uses: ./.github/actions/setup-go |
214 | 191 | with: |
215 | | - go-version: ${{ env.GO_VERSION }} |
216 | | - cache-dependency-path: | |
217 | | - go.sum |
218 | | - test/go.sum |
219 | | -
|
220 | | - - name: Pre-fill Module Cache |
221 | | - shell: powershell |
222 | | - run: | |
223 | | - go mod download |
224 | | - cd test |
225 | | - go mod download |
| 192 | + fill-module-cache: true |
226 | 193 |
|
227 | 194 | - name: Validate go generate |
228 | 195 | shell: powershell |
@@ -274,13 +241,10 @@ jobs: |
274 | 241 | with: |
275 | 242 | show-progress: false |
276 | 243 |
|
277 | | - - name: Install go |
278 | | - uses: actions/setup-go@v5 |
| 244 | + - name: Install Go |
| 245 | + uses: ./.github/actions/setup-go |
279 | 246 | with: |
280 | | - go-version: ${{ env.GO_VERSION }} |
281 | | - cache-dependency-path: | |
282 | | - go.sum |
283 | | - test/go.sum |
| 247 | + fill-module-cache: true |
284 | 248 |
|
285 | 249 | - name: Install gotestsum |
286 | 250 | run: go install gotest.tools/gotestsum@${{ env.GOTESTSUM_VERSION }} |
@@ -314,13 +278,8 @@ jobs: |
314 | 278 | with: |
315 | 279 | show-progress: false |
316 | 280 |
|
317 | | - - name: Install go |
318 | | - uses: actions/setup-go@v5 |
319 | | - with: |
320 | | - go-version: ${{ env.GO_VERSION }} |
321 | | - cache-dependency-path: | |
322 | | - go.sum |
323 | | - test/go.sum |
| 281 | + - name: Install Go |
| 282 | + uses: ./.github/actions/setup-go |
324 | 283 |
|
325 | 284 | - name: Install gotestsum |
326 | 285 | run: go install gotest.tools/gotestsum@${{ env.GOTESTSUM_VERSION }} |
@@ -447,14 +406,10 @@ jobs: |
447 | 406 | path: src/github.com/Microsoft/hcsshim |
448 | 407 | show-progress: false |
449 | 408 |
|
450 | | - - name: Install go |
451 | | - uses: actions/setup-go@v5 |
| 409 | + - name: Install Go |
| 410 | + uses: ./src/github.com/Microsoft/hcsshim/.github/actions/setup-go |
452 | 411 | with: |
453 | | - go-version: ${{ env.GO_VERSION }} |
454 | | - check-latest: true |
455 | | - cache-dependency-path: | |
456 | | - src/github.com/Microsoft/hcsshim/go.sum |
457 | | - src/github.com/Microsoft/hcsshim/test/go.sum |
| 412 | + repo-path: src/github.com/Microsoft/hcsshim |
458 | 413 |
|
459 | 414 | - name: Set env |
460 | 415 | shell: bash |
@@ -653,13 +608,8 @@ jobs: |
653 | 608 | with: |
654 | 609 | show-progress: false |
655 | 610 |
|
656 | | - - name: Install go |
657 | | - uses: actions/setup-go@v5 |
658 | | - with: |
659 | | - go-version: ${{ env.GO_VERSION }} |
660 | | - cache-dependency-path: | |
661 | | - go.sum |
662 | | - test/go.sum |
| 611 | + - name: Install Go |
| 612 | + uses: ./.github/actions/setup-go |
663 | 613 |
|
664 | 614 | - name: Set version info |
665 | 615 | shell: pwsh |
@@ -737,13 +687,8 @@ jobs: |
737 | 687 | with: |
738 | 688 | show-progress: false |
739 | 689 |
|
740 | | - - name: Install go |
741 | | - uses: actions/setup-go@v5 |
742 | | - with: |
743 | | - go-version: ${{ env.GO_VERSION }} |
744 | | - cache-dependency-path: | |
745 | | - go.sum |
746 | | - test/go.sum |
| 690 | + - name: Install Go |
| 691 | + uses: ./.github/actions/setup-go |
747 | 692 |
|
748 | 693 | - name: Set version info |
749 | 694 | shell: pwsh |
|
0 commit comments