Skip to content

Commit bfc969f

Browse files
committed
ci: add GitHub Actions CI.
1 parent cebbd4a commit bfc969f

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/coverage.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Set up Go
13+
uses: actions/setup-go@v4
14+
with:
15+
go-version: "1.20"
16+
17+
- name: Test
18+
run: go test -v ./... -coverprofile=coverage.out
19+
20+
- name: Upload coverage report
21+
uses: codecov/codecov-action@v3
22+
with:
23+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/test.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
build:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
go_version: ["1.18", "1.19", "1.20"]
12+
os: [ubuntu-latest, windows-latest, macOS-latest]
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up Go ${{ matrix.go_version }}
18+
uses: actions/setup-go@v4
19+
with:
20+
go-version: ${{ matrix.go_version }}
21+
22+
- name: Test
23+
run: go test -v ./...

0 commit comments

Comments
 (0)