-
-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (43 loc) · 1.2 KB
/
test.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
on: [ push, pull_request ]
jobs:
unit:
strategy:
matrix:
go: [ "1.22.x", "1.23.x" ]
runs-on: ubuntu-latest
name: Unit tests (Go ${{ matrix.go }})
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- run: go version
- name: Run tests
run: go test -v -cover -race -shuffle=on .
- name: Run tests (32 bit)
env:
GOARCH: 386
run: go test -v -cover -coverprofile=coverage.txt -shuffle=on .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage.txt
env_vars: GO=${{ matrix.go }}
token: ${{ secrets.CODECOV_TOKEN }}
integration:
strategy:
matrix:
go: [ "1.22.x", "1.23.x" ]
runs-on: ubuntu-latest
name: Integration tests (Go ${{ matrix.go }})
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- run: go version
- name: Run integration tests
run: |
for i in {1..25}; do
go test -v -race -shuffle=on ./integrationtests/self
done