-
-
Notifications
You must be signed in to change notification settings - Fork 150
89 lines (72 loc) · 2.51 KB
/
test.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: test
on:
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@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.14"
- name: Install Dependencies (Linux)
# run: sudo apt-get install ninja-build
run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev
if: matrix.operating-system == 'ubuntu-latest'
- 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
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: Build the Agent
run: task build
- name: Run unit tests
run: task test-unit
- name: Check dir content
run: ls
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: arduino-create-agent-${{ matrix.operating-system }}
path: arduino-create-agent*
if-no-files-found: error
# - 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