-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (36 loc) · 956 Bytes
/
gotest.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
name: "go test"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
paths:
- '**/*.go'
jobs:
test:
name: "go test"
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21.x', '1.22.x', '1.23.x' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: "go.sum"
- name: "print go version"
run: "go version"
- name: "install dependencies"
run: "go get -t ."
- name: "build"
run: "go build -v ./..."
- name: "tests"
run: "go test -count 100 ./..."
- name: "covered tests"
run: "go test -count 100 -coverprofile coverage.out ./..."
- name: "race check"
run: "go test -race -count 100 ./..."
- name: "check cleanups demo"
run: "go run ./cleanupsdemo"