Skip to content

Commit

Permalink
Merge pull request #13 from bergwolf/github/actions
Browse files Browse the repository at this point in the history
actions: add go mod cache
  • Loading branch information
changweige committed Jan 19, 2022
2 parents 0f90cc5 + a6ba9f9 commit 21cb822
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ jobs:
go-version: ${{ matrix.go-version }}
- name: Check out code
uses: actions/checkout@v1
- name: cache go mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go
- name: Build
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.43.0
Expand All @@ -50,6 +57,13 @@ jobs:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: cache go mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go
- name: Run unit tests.
run: make cover
- name: Upload coverage to Codecov
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: cache go mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go
- name: Build nydus-snapshotter
run: |
make static-release
Expand Down

0 comments on commit 21cb822

Please sign in to comment.