-
-
Notifications
You must be signed in to change notification settings - Fork 398
85 lines (66 loc) · 2.22 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: test
on: [push, pull_request]
jobs:
test-matrix:
strategy:
matrix:
operating-system: [ubuntu-18.04, windows-2019]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Disable EOL conversions
run: git config --global core.autocrlf false
- name: Checkout
uses: actions/checkout@master
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: '1.12.x'
- name: Install Go deps
run: |
go get github.com/golangci/govet
go get golang.org/x/lint/golint
go get github.com/golang/protobuf/protoc-gen-go
- name: Install Taskfile
uses: Arduino/actions/setup-taskfile@master
- name: Check the code is good
run: task check
- name: Install protoc compiler
uses: Arduino/actions/setup-protoc@master
- name: Check protocol buffers compile correctly
run: task protoc
- name: Build the CLI
run: task build
- name: Run unit tests
run: task test-unit
- name: Run unit tests on the legacy package
if: matrix.operating-system != 'windows-2019'
run: task test-legacy
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
architecture: 'x64'
- name: Run integration tests
run: |
pip install -r test/requirements.txt
task test-integration
- name: Send unit tests coverage to Codecov
if: matrix.operating-system != 'windows-2019'
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage_unit.txt
flags: unit
- name: Send integration tests coverage to Codecov
# Since secrets aren't available on forks, we only
# upload coverage on `push`. This might change if
# Codecov whitelists GitHub, lifting the need
# for a token.
if: >
matrix.operating-system != 'windows-2019' &&
github.event_name == 'push'
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage_integ.txt
flags: integ