-
-
Notifications
You must be signed in to change notification settings - Fork 400
102 lines (82 loc) · 2.69 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
name: test
on:
push:
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: Install Python
uses: actions/setup-python@v1
with:
python-version: "3.8"
architecture: "x64"
- name: Install Poetry
run: pip install poetry
- name: Check the code is good
run: task check
- name: Install protoc compiler
uses: arduino/setup-protoc@v1
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: Run integration tests
run: task test-integration
- name: Send unit tests coverage to Codecov
if: >
matrix.operating-system == 'ubuntu-latest' &&
github.event_name == 'push'
uses: codecov/codecov-action@v1
with:
file: ./coverage_unit.txt
flags: unit
- name: Send legacy tests coverage to Codecov
if: >
matrix.operating-system == 'ubuntu-latest' &&
github.event_name == 'push'
uses: codecov/codecov-action@v1
with:
file: ./coverage_legacy.txt
flags: unit
- name: Send integration tests coverage to Codecov
if: >
matrix.operating-system == 'ubuntu-latest' &&
github.event_name == 'push'
uses: codecov/codecov-action@v1
with:
file: ./coverage_integ.txt
flags: integ