-
Notifications
You must be signed in to change notification settings - Fork 136
66 lines (58 loc) · 1.72 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Go Tests
on:
push:
branches-ignore:
- master
pull_request:
branches-ignore:
- gh-pages
jobs:
go-lint:
# TODO(JayF): Configure this to only run when golang code has changed
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
go: [ '1.20' ]
steps:
- uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.17.3'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/workflows/go-setup
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: "v1.53.1"
skip-pkg-cache: true
skip-build-cache: true
args: "-c ./.golangci.yml --timeout=10m --issues-exit-code=1 --max-issues-per-linter=0 --sort-results ./..."
# TODO(JayF): Consider moving this into its own job, that runs under a larger set of circumstances
# since it's possible for this to fail without any go changes being made.
- name: Validate no changes in generated proto files
run: |
make proto
make dotnet
git status -s -uno
git --no-pager diff
exit $(git status -s -uno | wc -l)
go-unit-tests:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
go: [ '1.20' ]
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/go-setup
- name: make tests
run: make tests
- name: make junit-report
run: make junit-report
- name: Upload junit report
uses: actions/upload-artifact@v3.1.1
with:
name: junit.xml
path: test_reports/junit.xml