-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (72 loc) · 2.21 KB
/
tests.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
name: Tests
on:
push:
jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-24.04
steps:
- run: sudo apt-get update -qq
- run: sudo apt-get install -y
libssl-dev
libcurl4-openssl-dev
libcmocka-dev
- uses: actions/checkout@v4
- name: Configure
run: cmake
-B ${{github.workspace}}/build
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Run tests
run: CMOCKA_XML_FILE=cm_%g.xml CMOCKA_MESSAGE_OUTPUT=xml ctest --test-dir ${{github.workspace}}/build
- uses: actions/upload-artifact@v4
if: always()
with:
name: unit-test-results
path: '${{github.workspace}}/build/test/cm_*.xml'
end-to-end-tests:
name: End-to-End Tests
runs-on: ubuntu-24.04
steps:
- run: sudo apt-get update -qq
- run: sudo apt-get install -y
libssl-dev
libcurl4-openssl-dev
python3-pytest
casync
- run: sudo pip3 install pyzstd pycryptodome
- uses: actions/checkout@v4
- name: Configure
run: cmake
-D BUILD_TESTING=Off
-D CSN_SANITIZE=On
-B ${{github.workspace}}/build
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Run tests
run: PATH="$PATH:${{github.workspace}}/build" pytest -rP --junitxml=junit.xml
working-directory: "${{github.workspace}}/test/e2e"
- uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-test-results
path: "${{github.workspace}}/test/e2e/junit.xml"
results-summary:
name: Summarize test results
runs-on: ubuntu-24.04
needs: [unit-tests, end-to-end-tests]
if: ${{ always() }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: unit-test-results
path: ./unit-test-results
- uses: actions/download-artifact@v4
with:
name: e2e-test-results
path: ./e2e-test-results
- name: Test summary
uses: mikepenz/action-junit-report@v4
with:
report_paths: './*/*.xml'