-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 1.08 KB
/
ci.yaml
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
name: CI Pipeline
on:
pull_request:
push:
branches:
- master
permissions:
contents: read
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Configure correct Go version
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod
# Check formatting early for a fast fail
- run: bash -c "diff -bu <(echo -n) <(gofmt -l ./)"
- run: go build .
- uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc # v1.3.0
with:
install-go: false
- run: go vet ./...
- name: Run Tests
run: |
go install gotest.tools/gotestsum@latest
gotestsum --jsonfile gotestsum-report.json -- -race ./...
- name: Annotate tests
if: always()
uses: guyarb/golang-test-annotations@a7869d394e8879bfc2e5dba4f1ea8bbb77a74f59 # v0.7.0
with:
test-results: gotestsum-report.json