Skip to content

Commit

Permalink
CI: modernize Go setup
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Mar 30, 2022
1 parent 6827c12 commit 6fdff72
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 235 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
path: src/github.com/containerd/continuity
fetch-depth: 100

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x

- uses: containerd/project-checks@v1
with:
working-directory: src/github.com/containerd/continuity
Expand All @@ -38,15 +43,9 @@ jobs:

steps:
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.17

- name: Setup Go binary path
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
go-version: 1.17.x

- name: Git line endings
shell: bash
Expand All @@ -61,10 +60,7 @@ jobs:
fetch-depth: 25

- name: Dependencies
env:
GO111MODULE: on
shell: bash
run: go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.23.8
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.2

- name: Lint
shell: bash
Expand All @@ -80,7 +76,7 @@ jobs:
if: startsWith(matrix.os, 'ubuntu')
run: |
make test
sudo GOPATH=$GOPATH make root-test
sudo make root-test
working-directory: src/github.com/containerd/continuity

- name: Non-Linux Tests
Expand All @@ -101,14 +97,13 @@ jobs:

steps:
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.17

- name: Setup Go binary path
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Check out code
Expand Down
7 changes: 6 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/containerd/continuity

go 1.13
go 1.17

require (
// 5883e5a4b512fe2e32f915b1c66a1ddfef81cb3f is the last version to support macOS
Expand All @@ -15,3 +15,8 @@ require (
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
)

require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/spf13/pflag v1.0.3 // indirect
)
8 changes: 0 additions & 8 deletions vendor/bazil.org/fuse/go.mod

This file was deleted.

4 changes: 0 additions & 4 deletions vendor/bazil.org/fuse/go.sum

This file was deleted.

9 changes: 0 additions & 9 deletions vendor/github.com/Microsoft/go-winio/go.mod

This file was deleted.

14 changes: 0 additions & 14 deletions vendor/github.com/Microsoft/go-winio/go.sum

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/opencontainers/go-digest/go.mod

This file was deleted.

10 changes: 0 additions & 10 deletions vendor/github.com/sirupsen/logrus/go.mod

This file was deleted.

10 changes: 0 additions & 10 deletions vendor/github.com/sirupsen/logrus/go.sum

This file was deleted.

12 changes: 0 additions & 12 deletions vendor/github.com/spf13/cobra/go.mod

This file was deleted.

149 changes: 0 additions & 149 deletions vendor/github.com/spf13/cobra/go.sum

This file was deleted.

0 comments on commit 6fdff72

Please sign in to comment.