-
Notifications
You must be signed in to change notification settings - Fork 159
86 lines (75 loc) · 2.11 KB
/
test.yml
File metadata and controls
86 lines (75 loc) · 2.11 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
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
TEST_BOARD: 'qemu_gabbro'
jobs:
changes-test:
runs-on: ubuntu-24.04
permissions:
pull-requests: read
outputs:
should-test: ${{ github.event_name == 'push' || steps.filter.outputs.src == 'true' }}
steps:
- uses: dorny/paths-filter@v4
if: github.event_name == 'pull_request'
id: filter
with:
filters: |
src:
- '.github/workflows/test.yml'
- 'platform/**'
- 'resources/**'
- 'sdk/**'
- 'src/**'
- 'stored_apps/**'
- 'tests/**'
- 'tools/**'
- 'third_party/**'
- 'waftools/**'
- 'waf'
- 'wscript'
build-test:
needs: changes-test
if: needs.changes-test.outputs.should-test == 'true'
runs-on: ubuntu-24.04
container:
image: ghcr.io/coredevices/pebbleos-docker:v5
steps:
- name: Mark Github workspace as safe
run: git config --system --add safe.directory "${GITHUB_WORKSPACE}"
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: true
- name: Install Python dependencies
run: |
pip install -U pip
pip install -r requirements.txt
- name: Configure
run: ./waf configure --board ${{env.TEST_BOARD}}
- name: Run tests
run: ./waf test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: (!cancelled())
with:
report_paths: build/test/junit.xml
annotate_only: true
- name: Store failed test images
uses: actions/upload-artifact@v6
if: (!cancelled())
with:
name: failed_diff_images
path: build/test/tests/failed/*-diff.png
test-status:
needs: [changes-test, build-test]
if: always()
runs-on: ubuntu-24.04
steps:
- if: needs.build-test.result == 'failure' || needs.build-test.result == 'cancelled'
run: exit 1