-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (39 loc) · 1.46 KB
/
ci.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
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18' # The Go version to download (if necessary) and use.
# Some tests, notably TestRandomOperations, are extremely slow in CI
# with the race detector enabled, so we use -short when -race is
# enabled to reduce the number of slow tests, and then run without
# -short with -race disabled for a larger test set. The same tests
# are run, just with smaller data sets.
#
# We also do a 32-bit run. Even though this is executed on a 64-bit
# system, it will use 32-bit instructions and semantics (e.g. 32-bit
# integer overflow).
- name: test & coverage report creation
run: |
go test ./... -mod=readonly -timeout 5m -short -race -coverprofile=coverage.txt -covermode=atomic
go test ./... -mod=readonly -timeout 5m
GOARCH=386 go test ./... -mod=readonly -timeout 5m
- uses: codecov/codecov-action@v3.1.0
with:
file: ./coverage.txt
fail_ci_if_error: false