-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 909 Bytes
/
test.yml
File metadata and controls
45 lines (37 loc) · 909 Bytes
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: test
on:
push:
tags:
- '!v*'
branches:
- '*'
paths-ignore:
- 'os-image/**'
pull_request:
paths-ignore:
- 'os-image/**'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Download dependencies
run: go mod download
- name: Vet
run: go vet ./...
- name: Test with coverage
run: go test -race -timeout 120s -count=1 -cover -coverprofile=coverage.out ./...
- name: Upload coverage artifact
continue-on-error: true
uses: actions/upload-artifact@v6
with:
name: coverage
path: coverage.out
retention-days: 7
- name: Build binary
run: CGO_ENABLED=0 go build -o cocoon .