-
Notifications
You must be signed in to change notification settings - Fork 22
82 lines (68 loc) · 2.15 KB
/
tools-tests.yaml
File metadata and controls
82 lines (68 loc) · 2.15 KB
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
name: Tools tests
on:
push:
branches: [ main ]
paths:
- "tools/**"
pull_request:
branches: [ main ]
paths:
- "tools/**"
workflow_dispatch:
env:
GOOS: linux
GO111MODULE: on
jobs:
unit_tests:
name: Unit Tests
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
module: [ tools/plotter, tools/multi_loader/runner]
steps:
- name: Set up Golang
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Run tests
working-directory: ${{ matrix.module }}
run: go test -cover -race
mapper_e2e:
name: Mapper E2E Test
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
module: [ tools/mapper, ]
steps:
- name: Check out code
uses: actions/checkout@v3
with:
lfs: 'true'
- 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: Profile load check
run: |
gzip -d tools/mapper/profile.json.gz -c > tools/mapper/profile.json
python3 -c "import json; json.load(open('tools/mapper/profile.json'))"
- name: Test traces load check
run: |
python3 tools/mapper/trace_load_test.py -t tools/mapper/test_files/extremes/
- name: Extreme mapping tests
run: |
python3 tools/mapper/mapper.py -t tools/mapper/test_files/extremes -p tools/mapper/profile.json
diff tools/mapper/test_files/extremes/mapper_output.json tools/mapper/test_files/extremes/correct_mapper_output.json
- name: Run mapper tool on example trace
run: |
python3 tools/mapper/mapper.py -t data/traces/example -p tools/mapper/profile.json
diff data/traces/example/mapper_output.json data/traces/example/correct_mapper_output.json