Nix creates an appropriate environment to compile gixsql and run its tests.
A script run_test.sh located 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 on localhost:6666.
A wrapper of this script is present in the folder scripts/ of this repository. As run_test.sh fails 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 with make 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 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:
run_test.sh
located 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
.scripts/
of this repository. Asrun_test.sh
fails if it isn't into an appropriate nix shell, this wrapper disables this script if nix is not on your computer.Several caveats apply to the approach of this PR:
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.