Skip to content

Commit f78cdcc

Browse files
authored
Tweak CI (#265)
Use setup-go's built in mod caching instead of doing it by hand. Remove go mod download step. Switch to codecov's coveralls action. Signed-off-by: Andy Goldstein <[email protected]>
1 parent a0fa5e7 commit f78cdcc

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,17 @@ on:
99
branches: [ main ]
1010

1111
jobs:
12-
1312
test:
1413
name: Test
1514
runs-on: ubuntu-latest
1615
steps:
17-
1816
- name: Check out code into the Go module directory
19-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
2018

2119
- name: Set up Go
2220
uses: actions/setup-go@v5
2321
with:
2422
go-version-file: "go.mod"
25-
id: go
26-
27-
- name: Cache go module cache
28-
id: cache-go-mod
29-
uses: actions/cache@v3
30-
with:
31-
path: ~/go/pkg/mod
32-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
33-
restore-keys: |
34-
${{ runner.os }}-go-
35-
36-
- name: Get dependencies
37-
run: go mod download
3823

3924
- name: check
4025
run: make fix
@@ -45,23 +30,22 @@ jobs:
4530
- name: Test Sanity
4631
run: make test-sanity
4732

48-
- uses: shogo82148/actions-goveralls@v1
33+
- uses: codecov/codecov-action@v3
4934
with:
50-
path-to-profile: cover.out
35+
files: cover.out
36+
functionalities: fixes
5137

5238
lint:
5339
name: Lint
5440
runs-on: ubuntu-latest
5541
steps:
56-
5742
- name: Check out code into the Go module directory
5843
uses: actions/checkout@v2
5944

6045
- name: Set up Go
6146
uses: actions/setup-go@v5
6247
with:
6348
go-version-file: "go.mod"
64-
id: go
6549

6650
- name: Lint
6751
uses: golangci/golangci-lint-action@v3
@@ -73,7 +57,6 @@ jobs:
7357
if: github.event_name == 'pull_request'
7458
runs-on: ubuntu-latest
7559
steps:
76-
7760
- name: Check out code into the Go module directory
7861
uses: actions/checkout@v2
7962
with:
@@ -83,7 +66,6 @@ jobs:
8366
uses: actions/setup-go@v5
8467
with:
8568
go-version-file: "go.mod"
86-
id: go
8769

8870
- name: Run go-apidiff
8971
uses: joelanford/go-apidiff@main

0 commit comments

Comments
 (0)