Skip to content

Commit 6643a7d

Browse files
committed
Simplify CI: just test on Go 1.15
1 parent 6a9b7f8 commit 6643a7d

1 file changed

Lines changed: 3 additions & 55 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,18 @@ name: CI
22

33
on:
44
push:
5-
branches: [master, main, v*]
5+
branches: [master, main]
66
pull_request:
77
branches: [master, main]
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
go-version: ['1.15', '1.20', '1.21', '1.22', '1.23']
15-
1612
steps:
1713
- uses: actions/checkout@v4
18-
1914
- name: Set up Go
2015
uses: actions/setup-go@v5
2116
with:
22-
go-version: ${{ matrix.go-version }}
23-
24-
- name: Cache Go modules
25-
uses: actions/cache@v4
26-
with:
27-
path: |
28-
~/.cache/go-build
29-
~/go/pkg/mod
30-
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
31-
restore-keys: |
32-
${{ runner.os }}-go-${{ matrix.go-version }}-
33-
17+
go-version: '1.15'
3418
- name: Test
35-
run: go test -v ./...
36-
37-
- name: Test with Coverage
38-
if: matrix.go-version == '1.22'
39-
run: go test -coverprofile=coverage.out ./...
40-
41-
- name: Upload Coverage
42-
if: matrix.go-version == '1.22'
43-
uses: codecov/codecov-action@v4
44-
with:
45-
file: ./coverage.out
46-
flags: unittests
47-
name: codecov-umbrella
48-
fail_ci_if_error: false
49-
50-
lint:
51-
runs-on: ubuntu-latest
52-
steps:
53-
- uses: actions/checkout@v4
54-
55-
- name: Set up Go
56-
uses: actions/setup-go@v5
57-
with:
58-
go-version: '1.22'
59-
60-
- name: Run go vet
61-
run: go vet ./...
62-
63-
- name: Check formatting
64-
run: |
65-
# Only check .go files
66-
unformatted=$(gofmt -l *.go)
67-
if [ -n "$unformatted" ]; then
68-
echo "Code needs formatting:"
69-
gofmt -d *.go
70-
exit 1
71-
fi
19+
run: go test ./...

0 commit comments

Comments
 (0)