-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathconfig.yml
133 lines (127 loc) · 3.73 KB
/
config.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
version: 2.1
orbs:
codecov: codecov/codecov@1.0.2
jobs:
pre-commit-checks:
docker:
- image: cimg/python:3.12.3
environment:
GIT_LFS_SKIP_SMUDGE: 1
steps:
- checkout
- run:
name: Install pre-commit
command: |
pip install pre-commit
- run:
name: Run pre-commit hooks
command: |
merge_base=$(git merge-base -a HEAD origin/master)
changed_files=$(git diff --name-only $merge_base...HEAD)
echo "Changed files since branched from origin/master: " $changed_files
git reset --soft $merge_base
pre-commit run --show-diff-on-failure --files $changed_files
common-tests:
machine:
image: ubuntu-2404:current
environment:
GIT_LFS_SKIP_SMUDGE: 1
steps:
- checkout
- run:
name: Install dependencies
command: |
sudo rm -rf /var/lib/apt/lists/*
export DEBIAN_FRONTEND=noninteractive
export FORCED_ROOT=1
./software/common/common.sh install
- run:
name: Run tests & generate coverage reports
command: |
./software/common/common.sh test --cov --no-checks
./software/common/common.sh cov-cleanup
- codecov/upload:
file: './software/common/coverage_reports/coverage.info'
flags: 'common'
controller-tests:
machine:
image: ubuntu-2404:current
environment:
GIT_LFS_SKIP_SMUDGE: 1
resource_class: large
steps:
- checkout
- run:
name: Install dependencies
command: |
sudo rm -rf /var/lib/apt/lists/*
export DEBIAN_FRONTEND=noninteractive
export FORCED_ROOT=1
./software/common/common.sh install
- run:
name: Run tests & generate coverage reports
command: |
./software/controller/controller.sh test --cov --no-checks
./software/controller/controller.sh cov-cleanup
- codecov/upload:
file: './software/controller/coverage_reports/coverage.info'
flags: 'controller'
gui-tests:
machine:
image: ubuntu-2404:current
resource_class: large
environment:
GIT_LFS_SKIP_SMUDGE: 1
steps:
- checkout
- run:
name: Install dependencies
command: |
sudo rm -rf /var/lib/apt/lists/*
export DEBIAN_FRONTEND=noninteractive
export FORCED_ROOT=1
./software/gui/gui.sh install
- run:
name: Build and run app
command: |
export FORCED_ROOT=1
./software/gui/gui.sh build -j --no-checks
./software/gui/gui.sh run --startup-only
- run:
name: Run tests & generate coverage reports
command: |
export FORCED_ROOT=1
./software/gui/gui.sh test -j
- codecov/upload:
file: './software/gui/coverage_reports/coverage.info'
flags: 'gui'
debug-tests:
machine:
image: ubuntu-2404:current
environment:
GIT_LFS_SKIP_SMUDGE: 1
resource_class: medium
steps:
- checkout
- run:
name: Install dependencies
command: |
sudo rm -rf /var/lib/apt/lists/*
export DEBIAN_FRONTEND=noninteractive
export FORCED_ROOT=1
./software/common/common.sh install
./software/common/common.sh generate
- run:
name: Run unit tests
command: |
cd software/tools
poetry install --no-interaction
poetry run pytest -v
workflows:
commit:
jobs:
- pre-commit-checks
- common-tests
- controller-tests
- gui-tests
- debug-tests