Skip to content

Commit bcf7b03

Browse files
add workflow preset for running unit test
sadly then is less reusable than i wanted
1 parent d6579c9 commit bcf7b03

2 files changed

Lines changed: 23 additions & 5 deletions

File tree

.github/workflows/ssl.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ jobs:
2828
with:
2929
version: ${{ matrix.openssl.tag }}
3030

31-
- name: configure
32-
run: cmake --preset unit-tests
33-
- run: cmake --build --preset unit-tests
34-
- name: test
35-
run: ctest --preset unit-tests --output-on-failure
31+
- run: cmake --workflow --preset unit-tests
3632

3733
- if: github.event_name == 'push' && always()
3834
uses: ./.github/actions/badge

tests/CMakePresets.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,31 @@
178178
"name": "unit-tests",
179179
"description": "Run the unit tests",
180180
"configurePreset": "unit-tests",
181+
"output": {
182+
"outputOnFailure": true
183+
},
181184
"execution": {
182185
"noTestsAction": "error"
183186
}
184187
}
188+
],
189+
"workflowPresets": [
190+
{
191+
"name": "unit-tests",
192+
"steps": [
193+
{
194+
"type": "configure",
195+
"name": "unit-tests"
196+
},
197+
{
198+
"type": "build",
199+
"name": "unit-tests"
200+
},
201+
{
202+
"type": "test",
203+
"name": "unit-tests"
204+
}
205+
]
206+
}
185207
]
186208
}

0 commit comments

Comments
 (0)