-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
51 lines (49 loc) · 1.15 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: tests
on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: develop
jobs:
test:
name: Test
strategy:
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
go-version: [ "1.23.1" ]
runs-on: ${{ matrix.os }}
steps:
-
name: setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
-
name: checkout
uses: actions/checkout@v4
-
name: simple test
run: go test -v ./...
-
name: test with GC pressure
run: go test -v ./...
env:
GOGC: 1
-
name: test with race detector
run: go test -v -race ./...
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: setup Go
uses: actions/setup-go@v5
with:
go-version: 1.23.1
- name: checkout
uses: actions/checkout@v4
- name: measure coverage
run: go test -v -coverprofile=coverage.out ./...
- name: report coverage
run: |
bash <(curl -s https://codecov.io/bash)