-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPC-8232, HPC-7811, HPC-8130 - setup testing environment with jest and docker #26
Conversation
The CI checks seems to be failing for This has been fixed in #27 |
Need to add prefix to container names in docker compose to avoid conflict, however can't add another commit without this issue being fixed due to commit hooks. So please merge #27 as soon as you can and wait for another commit from me on #26 to avoid developers facing conflict with their existing containers |
No PRs are merged without CI passing. If you take a look at The real reason this PR is failing is because you overwritten this lock file when installing packages and you committed the changes. So, after adding Next, in Now, we come to the reason why the CI fails. Since Typescript 4.4 was released, it introduced a change to make all errors in So, since you changed Lastly, as a proof that CI in PRs was passing (and that this PR introduced changes which cause CI to fail), look at #25.
I have explained the reasons for failing CI in lots of detail above. If you need to commit and commit hooks stand in your way, just use For this PR in particular, I would say:
You could also split this work across multiple commits, but keep the packages in |
Okay
Okay got it, I had a merge conflict on my yarn.lock so I did a fresh yarn.install. So I haven't actually downgraded anything in package.json. |
I assume you made changes, committed and then rebased on latest develop, which resulted in a conflict.
Yup, this is the way I would do it. You can use the commands I put above. |
95f2a90
to
7b6836f
Compare
Add test Context object
Set up unit testing using Jest and Docker. In Docker compose, empty Postgres database is initialized using a minimal schema that matches what’s currently being used in HPC. The schema was generated from Postgres container from hpc-suite's
start.sh
with latest production DB synced to local:docker exec hpc_service-pgsql-1 pg_dump --schema-only --no-owner -U postgres hpc --file /backups/schema-2024-02-29.sql
A few example tests were added and those which interact with models are using transactions.
This PR is related to tickets HPC-8232, HPC-7811 and HPC-8130.