-
-
Notifications
You must be signed in to change notification settings - Fork 20
48 lines (41 loc) · 1.02 KB
/
checks.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
46
47
48
name: Code Analysis
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
go: [1.20]
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ">=1.20"
- name: Checkout Code
uses: actions/checkout@v3
- name: Run staticcheck
continue-on-error: true
uses: dominikh/staticcheck-action@v1.2.0
with:
checks: all
version: "latest"
install-go: false
cache-key: ${{ matrix.go }}
working-directory: ${{ matrix.dir }}
- name: Run Tests
run: |
go test ./...
- name: Generate Coverage Profile
run: |
go test -cover ./... -coverprofile coverage.txt -coverpkg ./...
- name: Upload coverage reports to Codecov
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov --file coverage.txt