-
Notifications
You must be signed in to change notification settings - Fork 34
92 lines (82 loc) · 2.6 KB
/
run_tests.yml
File metadata and controls
92 lines (82 loc) · 2.6 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
83
84
85
86
87
88
89
90
91
92
name: Build Sidewalk samples
on:
workflow_call:
inputs:
jobs_per_subset:
type: number
required: false
default: 6
jobs:
# discover_targets and build-and-test_on_hw removed: they require self-hosted runners
build_and_run_x86_tests:
name: Run UT on x86
runs-on: ubuntu-24.04
container:
image: ghcr.io/nrfconnect/sdk-sidewalk:main
options: --cpus 2
defaults:
run:
shell: nrfutil toolchain-manager launch --install-dir /root/ncs bash -- {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
path: sidewalk
- name: update NRF
run: |
rm -rf .west;
west init -l sidewalk --mf west.yml &&
west update -n -o=--depth=1 --path-cache /workdir/
- name: Install Python dependencies
run: |
python3 -m pip install \
-r nrf/scripts/requirements.txt \
-r zephyr/scripts/requirements.txt \
-r sidewalk/scripts/ci/requirements.txt
- name: Ccache
id: ccache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-test_x86-${{ github.run_id }}
restore-keys: ccache-test_x86-
- name: Twister build and run x86 tests
run: |
source zephyr/zephyr-env.sh
west twister --test-config sidewalk/test_config.yaml \
--level="Github_tests" --testsuite-root sidewalk \
--platform native_sim --platform unit_testing \
--coverage --coverage-basedir sidewalk --coverage-formats html,xml \
--enable-ubsan --enable-lsan --enable-asan --inline-logs \
--overflow-as-errors -vvv
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: tests-x86_result
path: |
twister-out/twister.xml
twister-out/**/handler.log
twister-out/**/device.log
twister-out/coverage
include-hidden-files: true
- name: Code Coverage Summary Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: 'twister-out/coverage/coverage.xml'
badge: true
format: 'markdown'
output: 'both'
- name: publish coverage summary
run: |
cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
- name: Cleanup
run: |
rm -rf sidewalk
rm -rf zephyr
rm -rf nrf
rm -rf test
rm -rf tools
rm -rf nrfxlib
rm -rf modules