-
Notifications
You must be signed in to change notification settings - Fork 15
71 lines (59 loc) · 1.55 KB
/
unit-tests.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
name: Unit tests
on:
push:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.md'
workflow_dispatch:
env:
GOOS: linux
GO111MODULE: on
jobs:
unit_tests:
name: Build and test
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
module:
[
config,
driver,
generator,
trace,
]
steps:
- uses: actions/checkout@v3
with:
lfs: 'true'
- uses: actions/setup-go@v5
with:
go-version: 1.22
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('tools/trace_synthesizer/requirements.txt') }}
- name: Install requirements
run: pip install -r ./tools/trace_synthesizer/requirements.txt
- name: Build loader
run: go build cmd/loader.go
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}
- name: Install requirements
run: pip install -r ./requirements.txt
- name: Run loader tests
run: go test -v -cover -race ./pkg/${{ matrix.module }}