-
Notifications
You must be signed in to change notification settings - Fork 12
43 lines (37 loc) · 1.05 KB
/
test-go.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
name: Test GO
on: workflow_call
jobs:
code_lint:
name: Code lint with golangci-lint
runs-on: ubuntu-latest
container:
image: golangci/golangci-lint:v1.45.2
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: run_golangci-lint
run: |
apt-get update && apt-get install -y jq
golangci-lint run --issues-exit-code 1 --out-format code-climate | tee gl-code-quality-report.json | jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
code_test:
name: Code test with go test
runs-on: ubuntu-latest
container:
image: vxcontrol/vxbuild-cross:1.19
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Enable cache
uses: ./.github/actions/go_cache
- uses: actions/download-artifact@v3
with:
name: all_environment
- name: run_go-test
run: |
mkdir -p .go
go get ./...
make test