-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (60 loc) · 1.34 KB
/
build-test.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: build & test
on:
push:
branches: main
paths:
- '**.go'
- .github/workflows/build-test.yml
- 'go.mod'
- 'go.sum'
pull_request:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- .github/workflows/build-test.yml
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.x'
- name: build
shell: bash
run: |
make build
- name: test
shell: bash
run: |
make test
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
- name: lint
shell: bash
run: |
go get golang.org/x/lint/golint
make lint
- name: vet
shell: bash
run: |
make vet
- name: fmt
shell: bash
run: |
make fmt
- name: make test coverage
shell: bash
run: |
make cover
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
flags: unittests
files: ${{ github.workspace }}/coverage.txt
verbose: true