-
-
Notifications
You must be signed in to change notification settings - Fork 12
84 lines (70 loc) · 1.81 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
name: Run tests
on:
push:
paths:
- ".github/workflows/test.yml"
- "Taskfile.yml"
- "go.mod"
- "go.sum"
- "**/*.go"
- "**/testdata/**"
- "etc/schemas/**/*.json"
- "pyproject.toml"
- "test/**"
- "Taskfile.yml"
pull_request:
paths:
- ".github/workflows/test.yml"
- "Taskfile.yml"
- "go.mod"
- "go.sum"
- "**/*.go"
- "**/testdata/**"
- "etc/schemas/**/*.json"
- "pyproject.toml"
- "test/**"
- "Taskfile.yml"
jobs:
test-go:
strategy:
matrix:
operating-system:
- ubuntu-latest
- windows-latest
- macOS-latest
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout local repository
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.14"
- name: Install Taskfile
uses: arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Generate code
run: task go:generate
- name: Check for forgotten code generation
run: git diff --color --exit-code
- name: Build
run: task build
- name: Run unit tests
run: task go:test-unit
- name: Send unit tests coverage to Codecov
if: matrix.operating-system == 'ubuntu-latest'
uses: codecov/codecov-action@v1
with:
file: ./coverage_unit.txt
flags: unit
fail_ci_if_error: true
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Poetry
run: pip install poetry
- name: Run integration tests
run: task test-integration