morphir-elm
morphir-elm copied to clipboard
Ensure that the spark elm-tests are being run during CI
Context
The csv testing pull request added some elm-test tests to tests-integration/spark/elm-tests/tests
, which pulls in a huge dataset stored in csv format (due to technical limitations, hard-coded into an elm file which is re-generated by a shell script), run the functions defined in tests-integration/spark/model/src/SparkTests/Rules/Income/Antique.elm
, and prints the output in csv format.
There is a script, tests-integration/spark/elm-tests/tests/create_csv_files.sh
which will run these elm-tests and write csv files of the expected output somewhere that our Spark tests can find and compare against.
Currently, the csv files of the expected results are generated by running create_csv_files.sh
manually, and committing the output into the git repository. This is partly due to a shell script being run, and morphir needing to be run on platforms that don't have shell.
It would be better if this is run automatically, so that changes in the code that change the output of Elm or Spark are caught before code is merged.
Task
- [ ] Find out if the summary in "Context" is a correct understanding of the current state of the codebase.
- [ ] Find out if
gulp test
already causes create_csv_files.sh to be run if possible. - [ ] If not, write a new automation step in
gulpfile.js
which runscreate_csv_files.sh
before testIntegrationMakeSpark, if run on a platform that supports this.