-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish porting all tests to GitHub Actions
This new port now tries to *not* rely too much on GitHub Actions conventions (which are not that many, anyway), and also splits the big test.sh script we used with Travis into smaller scripts in a new .ci directory that can be invoked separately, therefore allowing us to model each individual test as a different step on the GitHub Actions workflow. Signed-off-by: Rodrigo Tobar <[email protected]>
- Loading branch information
Showing
4 changed files
with
100 additions
and
7 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,18 @@ | ||
# Generate the HDF5 output documentation and check it's up to date | ||
# otherwise tell the user how to update it | ||
hdf5_file="$1" | ||
rst_file="$2" | ||
hdf5_file_basename=`basename "${hdf5_file}"` | ||
full_rst_file="doc/hdf5_properties/${rst_file}" | ||
|
||
scripts/properties_as_list.sh "${TEST_OUTPUTS_DIR}/${TEST_SIM_NAME}/${hdf5_file}" > props.rst | ||
_diff="`diff -Naur "${full_rst_file}" props.rst`" | ||
if [ -n "${_diff}" ]; then | ||
echo "\nThe file ${full_rst_file} is out of date. This probably means that you added a new\n" \ | ||
"dataset to shark's output, but forgot to update the corresponding documentation.\n" \ | ||
"The full difference follows:\n\n${_diff}\n\n" \ | ||
"Please run the script/properties_as_lish.sh script against a ${hdf5_file_basename} file\n" \ | ||
"to re-generate its documentation, then commit your changes. For example:\n\n" \ | ||
"scripts/properties_as_list.sh my-output/model/199/0/${hdf5_file_basename} > ${full_rst_file}" >&2 | ||
exit 1 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
reference_model_name=$1 | ||
shift | ||
this_model_name=$1 | ||
shift | ||
|
||
python scripts/compare_galaxies.py -m \ | ||
"${TEST_OUTPUTS_DIR}/${TEST_SIM_NAME}/${reference_model_name}/199/0/galaxies.hdf5" \ | ||
"${TEST_OUTPUTS_DIR}/${TEST_SIM_NAME}/${this_model_name}/199/0/galaxies.hdf5" \ | ||
$@ |
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,10 @@ | ||
model_name=$1 | ||
shift | ||
|
||
${CI_BUILD_DIR}/shark ci-test.cfg \ | ||
-o execution.output_bh_histories=true -o execution.snapshots_bh_histories=199 \ | ||
-o simulation.redshift_file=${TEST_INPUTS_DIR}/redshifts.txt \ | ||
-o simulation.tree_files_prefix=${TEST_INPUTS_DIR}/tree_199 \ | ||
-o simulation.sim_name=${TEST_SIM_NAME} \ | ||
-o execution.name_model=$model_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