The application is hosted on Render cloud. The on production, application uses Postgres database hosted on ElephantSql.
See live at CICD Notes
See the Github Actions workflow.
The workflow has only a single job which consists of four steps: three test jobs and a final deploy job. The test jobs are executed on push and merge to main branch, while the deploy job is executed only on merge to main
These jobs are executed in parallel. Each job will lint and test different parts of the code.
Installs client dependencies, lints the code and finally runs the client-only tests.
This step is similiar to client step, but only on the server side. The job has an additional service: postgres database in a container. The connection string to this database is given as an environment variable.
End-to-end tests require the server and the client to be running. This job also uses the postgres database container service.
This final job waits for the test jobs to complete. If one of the test jobs fails, this job is not executed.
Triggers deploy to render with a single HTTP-request. The deploy url is a Github secret. On the Render side, the new version of the app is brought up only if the health check passes. The health test is route on the server side, which checks the database connectivity.
- Containers
- React
- Node
- Express
- Postgres
- Testing