superbol-studio-oss
superbol-studio-oss copied to clipboard
Run tests of gixsql in CI with the new preprocessor
This PR adds the tests of gixsql (https://github.com/OcamlPro/gixsql) in the CI of Superbol. As you can check on my fork (https://github.com/Halbaroth/superbol-studio-oss/pull/1), only 43 out of 69 tests succeed.
How it works:
- Nix creates an appropriate environment to compile gixsql and run its tests.
- A script
run_test.shlocated in the gixsql repository set up a complete test environment based on environment variables from a nix shell. This environment includes a PostgreSQL server that will run onlocalhost:6666. - A wrapper of this script is present in the folder
scripts/of this repository. Asrun_test.shfails if it isn't into an appropriate nix shell, this wrapper disables this script if nix is not on your computer. - An action is called in the github workflow to install Nix.
Several caveats apply to the approach of this PR:
- I import the project gixsql.
- I install the latest release of GnuCOBOL in the Nix unstable channel, which means we do not test the preprocessor with the current development version of GnuCOBOL.
- If you have another PostgreSQL server on your machine which listen to
localhost:6666, you will got an error withmake test.
Currently, I active the verbosity mode of gixsql test runner, so the make test command produces a huge output. I plan to fix this soon.
This PR is rebased on #370.
Like #375, this PR shall remain a draft until #370 is merged.