Skip to content

Commit c1685a0

Browse files
committed
add CI
1 parent 8ccb4af commit c1685a0

File tree

2 files changed

+83
-6
lines changed

2 files changed

+83
-6
lines changed

Diff for: chapters/06_ci.md

+77-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,80 @@ Note:
44

55
* CI/CD
66
* mini Pipeline
7-
* Pytest
7+
* Pytest
8+
9+
--
10+
11+
```yaml [|3-7|14-18|19-23|22|24-29|30-35]
12+
name: CI
13+
14+
on:
15+
push:
16+
branches: [develop]
17+
pull_request:
18+
branches: [develop]
19+
20+
jobs:
21+
test:
22+
name: CI Gate
23+
runs-on: windows-latest
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
- name: install tools, build and test
31+
run: |
32+
.\build.ps1 -install
33+
.\build.ps1 -target selftests
34+
shell: powershell
35+
- name: Publish Test Results
36+
uses: EnricoMi/publish-unit-test-result-action/composite@v2
37+
if: always()
38+
with:
39+
files: |
40+
test/output/test-report.xml
41+
- uses: actions/upload-artifact@v2
42+
with:
43+
name: artifacts.zip
44+
retention-days: 90
45+
path: "build/**/artifacts.*"
46+
if-no-files-found: error
47+
```
48+
49+
--
50+
51+
<pre><code class="fragment powershell" data-trim>
52+
.\build.ps1 -target selftests
53+
</code></pre>
54+
55+
<pre><code class="fragment powershell" data-trim>
56+
python -m pipenv run python -m pytest test --junitxml=$pytestJunitXml
57+
</code></pre>
58+
59+
<pre><code class="fragment python" data-trim>
60+
def test_build():
61+
assert 0 == SplBuild(
62+
variant="CustA/Disco",
63+
build_kit="prod",
64+
expected_artifacts=ArtifactsCollection(
65+
artifacts=["spled.exe", "compile_commands.json"]
66+
),
67+
).execute(target="all", strict=True, archive=True)
68+
</code></pre>
69+
70+
<pre><code class="fragment python" data-trim>
71+
def test_reports():
72+
assert 0 == SplBuild(
73+
variant="CustA/Disco",
74+
build_kit="test",
75+
expected_artifacts=ArtifactsCollection(artifacts=["reports"]),
76+
).execute(target="reports", strict=True, archive=True)
77+
</code></pre>
78+
79+
--
80+
81+
* Mini CI-Pipeline
82+
* etwas Python-Kleber
83+
* CMake + C-test-Framework

Diff for: chapters/07_recap.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
--
44

5-
## Component
5+
## Software
66

7-
* 🛠️ configurable <!-- .element: class="fragment custom blur" -->
8-
* 🧩 transferable <!-- .element: class="fragment custom blur" -->
9-
* 😎 tested <!-- .element: class="fragment custom blur" -->
10-
* 🔎 A.SPICE compliant <!-- .element: class="fragment custom blur" -->
7+
* 🛠️ konfigurierbar <!-- .element: class="fragment custom blur" -->
8+
* 🧩 isoliert <!-- .element: class="fragment custom blur" -->
9+
* 😎 getestet <!-- .element: class="fragment custom blur" -->
10+
* 🔎 A.SPICE erprobt <!-- .element: class="fragment custom blur" -->
11+
* 📦 auslieferbar <!-- .element: class="fragment custom blur" -->
1112

1213
Note:
1314

0 commit comments

Comments
 (0)