-
-
Notifications
You must be signed in to change notification settings - Fork 398
119 lines (99 loc) · 3.43 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: test
on:
push:
branches:
- master
pull_request:
jobs:
test-matrix:
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
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@v2
with:
go-version: '1.14'
- name: Install Go deps
# Since 10/23/2019 pwsh is the default shell
# on Windows, but pwsh fails to install protoc-gen-go so
# we force bash as default shell for all OSes in this task
run: |
go get github.com/golangci/govet
go get golang.org/x/lint/golint
go get github.com/golang/protobuf/protoc-gen-go
go get github.com/GeertJohan/go.rice/rice
shell: bash
- name: Install Taskfile
uses: Arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check the code is good
run: task check
- name: Install protoc compiler
uses: arduino/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- 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
# Run legacy tests on one platform only
if: matrix.operating-system == 'ubuntu-latest'
run: task test-legacy
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
architecture: 'x64'
- name: Run integration tests
run: |
pip install -r test/requirements.txt
task test-integration
- name: Send unit 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 == 'ubuntu-latest' &&
github.event_name == 'push'
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage_unit.txt
flags: unit
- name: Send legacy 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 == 'ubuntu-latest' &&
github.event_name == 'push'
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage_legacy.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 == 'ubuntu-latest' &&
github.event_name == 'push'
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage_integ.txt
flags: integ