Skip to content

Commit d67721d

Browse files
committed
CI: modernize Go setup
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 5bf078f commit d67721d

12 files changed

Lines changed: 27 additions & 235 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
path: src/github.com/containerd/continuity
2323
fetch-depth: 100
2424

25+
- name: Set up Go
26+
uses: actions/setup-go@v3
27+
with:
28+
go-version: 1.17.x
29+
2530
- uses: containerd/project-checks@v1
2631
with:
2732
working-directory: src/github.com/containerd/continuity
@@ -38,15 +43,9 @@ jobs:
3843

3944
steps:
4045
- name: Set up Go
41-
uses: actions/setup-go@v1
46+
uses: actions/setup-go@v3
4247
with:
43-
go-version: 1.17
44-
45-
- name: Setup Go binary path
46-
shell: bash
47-
run: |
48-
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
49-
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
48+
go-version: 1.17.x
5049

5150
- name: Git line endings
5251
shell: bash
@@ -61,10 +60,7 @@ jobs:
6160
fetch-depth: 25
6261

6362
- name: Dependencies
64-
env:
65-
GO111MODULE: on
66-
shell: bash
67-
run: go get github.com/golangci/golangci-lint/cmd/[email protected]
63+
run: go install github.com/golangci/golangci-lint/cmd/[email protected]
6864

6965
- name: Lint
7066
shell: bash
@@ -80,7 +76,7 @@ jobs:
8076
if: startsWith(matrix.os, 'ubuntu')
8177
run: |
8278
make test
83-
sudo GOPATH=$GOPATH make root-test
79+
sudo make root-test
8480
working-directory: src/github.com/containerd/continuity
8581

8682
- name: Non-Linux Tests
@@ -101,14 +97,13 @@ jobs:
10197

10298
steps:
10399
- name: Set up Go
104-
uses: actions/setup-go@v1
100+
uses: actions/setup-go@v3
105101
with:
106102
go-version: 1.17
107103

108104
- name: Setup Go binary path
109105
shell: bash
110106
run: |
111-
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
112107
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
113108
114109
- name: Check out code

go.mod

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/containerd/continuity
22

3-
go 1.13
3+
go 1.17
44

55
require (
66
// 5883e5a4b512fe2e32f915b1c66a1ddfef81cb3f is the last version to support macOS
@@ -15,3 +15,8 @@ require (
1515
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
1616
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
1717
)
18+
19+
require (
20+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
21+
github.com/spf13/pflag v1.0.3 // indirect
22+
)

vendor/bazil.org/fuse/go.mod

Lines changed: 0 additions & 8 deletions
This file was deleted.

vendor/bazil.org/fuse/go.sum

Lines changed: 0 additions & 4 deletions
This file was deleted.

vendor/github.com/Microsoft/go-winio/go.mod

Lines changed: 0 additions & 9 deletions
This file was deleted.

vendor/github.com/Microsoft/go-winio/go.sum

Lines changed: 0 additions & 14 deletions
This file was deleted.

vendor/github.com/opencontainers/go-digest/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

vendor/github.com/sirupsen/logrus/go.mod

Lines changed: 0 additions & 10 deletions
This file was deleted.

vendor/github.com/sirupsen/logrus/go.sum

Lines changed: 0 additions & 10 deletions
This file was deleted.

vendor/github.com/spf13/cobra/go.mod

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)