Skip to content

Commit

Permalink
Add action for testing examples on pushes to master
Browse files Browse the repository at this point in the history
  • Loading branch information
kintel committed May 19, 2024
1 parent 6bde8bd commit 05bdfce
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Linux Release Tests

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
name: Test examples

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
run: ./scripts/github-ci-linux-get-dependencies.sh kinetic
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build and test
run: ./scripts/github-ci.sh enable_python build test_examples test
- name: Upload Test Result Report
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: Test Result Report (Test examples)
path: |
b/Testing/Temporary/*_report.html
b/Testing/Temporary/LastTest.log
7 changes: 6 additions & 1 deletion scripts/github-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,17 @@ do_build() {
fi
}

do_test_examples() {
echo "do_test_examples()"
CTEST_ARGS="-C Examples"
}

do_test() {
echo "do_test()"

(
cd "$BUILDDIR"
ctest $PARALLEL_CTEST
ctest $PARALLEL_CTEST $CTEST_ARGS
if [[ $? != 0 ]]; then
exit 1
fi
Expand Down

0 comments on commit 05bdfce

Please sign in to comment.