| 1 |
# ---------------------------------------------------------------------------- |
| 2 |
# GitHub Actions workflow to test correct output on demo models. |
| 3 |
# ---------------------------------------------------------------------------- |
| 4 |
|
| 5 |
name: Test Demo Models |
| 6 |
|
| 7 |
on: [push, pull_request] |
| 8 |
|
| 9 |
defaults: |
| 10 |
run: |
| 11 |
shell: bash |
| 12 |
|
| 13 |
jobs: |
| 14 |
test: |
| 15 |
name: Test Demo Models |
| 16 |
runs-on: ubuntu-latest |
| 17 |
container: kambi/castle-engine-cloud-builds-tools:cge-unstable |
| 18 |
steps: |
| 19 |
- uses: actions/checkout@v4 |
| 20 |
|
| 21 |
- name: Checkout demo-models |
| 22 |
uses: actions/checkout@v4 |
| 23 |
with: |
| 24 |
repository: castle-engine/demo-models |
| 25 |
path: demo-models |
| 26 |
|
| 27 |
- name: Build |
| 28 |
run: make |
| 29 |
|
| 30 |
- name: Run Tests |
| 31 |
run: test_scripts/run_tests_on_dir_final.sh demo-models/ |
| 32 |
|
| 33 |
# We save output before comparing. |
| 34 |
# This way we have it even when comparing fails. |
| 35 |
# This is useful to later analyze, and to update test_scripts/run_tests_valid_output.txt . |
| 36 |
- name: Archive Artifacts (logs) |
| 37 |
uses: actions/upload-artifact@v4 |
| 38 |
with: |
| 39 |
name: logs |
| 40 |
path: | |
| 41 |
run_tests_output.txt |
| 42 |
run_tests_output_verbose.txt |
| 43 |
if-no-files-found: error |
| 44 |
|
| 45 |
- name: Compare test with last known good output |
| 46 |
run: diff -wu run_tests_output.txt test_scripts/run_tests_valid_output.txt |