-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Per #675, moved scripting logic from testing workflow file into scrip…
…ts to call and moved name of steps to top of step to make workflow yml more readable. ci-run-all-diff
- Loading branch information
1 parent
9aa9058
commit 857b68f
Showing
5 changed files
with
78 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /bin/bash | ||
|
||
# Called from .github/workflows/testing.yml | ||
# Creates directory for output data artifact and | ||
# copies output data into directory | ||
|
||
artifact_name=${{ steps.get-artifact-name.outputs.artifact_name }} | ||
mkdir -p artifact/${artifact_name} | ||
cp -r ${RUNNER_WORKSPACE}/output/* artifact/${artifact_name}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#! /bin/bash | ||
|
||
# Create directories used for use case that uses METviewer and METdatadb | ||
# Open up write permissions for these directories so that files can | ||
# be written by METviewer Docker container. | ||
# Called by .github/workflows/testing.yml | ||
|
||
if [ -z "${RUNNER_WORKSPACE}" ]; then | ||
echo "ERROR: RUNNER_WORKSPACE env var must be set" | ||
exit 1 | ||
fi | ||
|
||
mkdir -p $RUNNER_WORKSPACE/mysql | ||
mkdir -p $RUNNER_WORKSPACE/output/metviewer | ||
chmod a+w $RUNNER_WORKSPACE/mysql | ||
chmod a+w $RUNNER_WORKSPACE/output/metviewer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#! /bin/bash | ||
|
||
# Called by .github/workflows/testing.yml | ||
# Runs Python script to perform difference testing on use case output | ||
# to compare output to truth data. | ||
# If any differences were reported, set GHA output var upload_diff | ||
# to true, copy difference files to artifact directory, and return | ||
# non-zero status. If no differences were found, set GHA output var | ||
# upload_diff to false | ||
|
||
artifact_name=${{ steps.get-artifact-name.outputs.artifact_name }} | ||
.github/jobs/setup_and_run_diff.py ${{ matrix.categories }} $artifact_name | ||
|
||
if [ "$( ls -A ${RUNNER_WORKSPACE}/diff)" ]; then | ||
echo ::set-output name=upload_diff::true | ||
mkdir -p artifact/diff-${artifact_name} | ||
cp -r ${RUNNER_WORKSPACE}/diff/* artifact/diff-${artifact_name} | ||
exit 1 | ||
fi | ||
|
||
echo ::set-output name=upload_diff::false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#! /bin/bash | ||
|
||
# Called from .github/workflows/testing.yml | ||
# Call Python script to copy logs from any use case that contains "ERROR:" | ||
# into directory to create GitHub Actions artifact. | ||
# Sets output variable upload_error_logs to 'true' if errors occurred or | ||
# 'false' if no errors occurred | ||
|
||
.github/jobs/copy_error_logs.py ${RUNNER_WORKSPACE}/output artifact/error_logs | ||
if [ -d "artifact/error_logs" ]; then | ||
echo ::set-output name=upload_error_logs::true | ||
else | ||
echo ::set-output name=upload_error_logs::false | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters