-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (52 loc) · 1.29 KB
/
static-test.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
49
50
51
52
53
54
55
56
57
---
name: static-tests
on:
# schedule:
# # times are in UTC
# - cron: '19 21 * * *'
pull_request:
branches:
- master
- release-*
paths-ignore:
- '**.html'
- '**.md'
- 'LICENSE'
- 'doc/**'
push:
branches:
- master
paths-ignore:
- '**.html'
- '**.md'
- 'LICENSE'
- 'doc/**'
jobs:
unit-test:
runs-on: ubuntu-latest
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19.x
id: go
- name: make unit-test
working-directory: ${{ env.working-directory }}
run: |
export GOPATH=${GITHUB_WORKSPACE}/go
export PATH=$PATH:$GOPATH/bin
make check
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
working-directory: ${{ env.working-directory }}
files: ./tests/cov.unit-test.out
flags: unittests