Skip to content

Commit

Permalink
Use latest version of github actions. (#112)
Browse files Browse the repository at this point in the history
I do wonder whether #111 is failing due to the caching we might have (?)

Based on https://github.com/uber-go/zap/blob/master/.github/workflows/go.yml
  • Loading branch information
rabbbit authored Jul 9, 2023
1 parent 021eef1 commit 25bdf05
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
cache-dependency-path: '**/go.sum'
- name: Benchmark
run: make bench
17 changes: 6 additions & 11 deletions .github/workflows/cover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Load cached dependencies
uses: actions/cache@v2
- name: Setup Go
uses: actions/setup-go@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
go-version: ${{ matrix.go }}
cache-dependency-path: '**/go.sum'

- name: Download dependencies
run: go mod download
Expand All @@ -34,4 +29,4 @@ jobs:
run: make cover

- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
17 changes: 6 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,14 @@ jobs:
latest: true

steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Load cached dependencies
uses: actions/cache@v2
- name: Setup Go
uses: actions/setup-go@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
go-version: ${{ matrix.go }}
cache-dependency-path: '**/go.sum'

- name: Download dependencies
run: go mod download
Expand All @@ -52,7 +47,7 @@ jobs:

- name: Upload coverage to codecov.io
if: matrix.latest
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3

# TODO decide whether we want to benchmark on every run.
# name: Benchmark
Expand Down

0 comments on commit 25bdf05

Please sign in to comment.