Skip to content

Commit db537b7

Browse files
authored
Merge pull request #18 from PecanProject/15_check_output
added check that niwot.out hasn't changed to github actions
2 parents 5c9bdc0 + 8e959b7 commit db537b7

File tree

2 files changed

+5249
-5238
lines changed

2 files changed

+5249
-5238
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111

12-
# try to build PEcAn on all versions of R
12+
# try to build SIPNET on Windows, Ubuntu, MacOS
1313
build:
1414
strategy:
1515
fail-fast: false
@@ -44,3 +44,14 @@ jobs:
4444
run: |
4545
echo "::error title={No Output}::Test run for Niwot site failed to produce output"
4646
exit 1
47+
# check whether niwot.out has changed
48+
- name: Check whether niwot.out has changed
49+
if: runner.os != 'Windows' #fails b/c line endings?
50+
shell: bash
51+
run: |
52+
if git diff --exit-code Sites/Niwot/niwot.out; then
53+
echo "Success: Niwot.out created and has not changed"
54+
else
55+
echo "::error title={Output Changed}::The test file niwot.out has changed"
56+
exit 1
57+
fi

0 commit comments

Comments
 (0)