-
Notifications
You must be signed in to change notification settings - Fork 19
42 lines (34 loc) · 950 Bytes
/
builder.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
on: [push, pull_request]
name: Build
jobs:
test:
name: Build and Test
strategy:
matrix:
go-version: [1.20.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Code format
run: diff -u <(echo -n) <(gofmt -d -s .)
- name: Vet
run: go vet ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
- name: Unit tests
run: go test -race -coverprofile=coverage.out ./...
- name: Function coverage
run: go tool cover "-func=coverage.out"
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
file: ./coverage.out
- name: Build and Test
run: |
./scripts/totp-test.sh