Configuring the pipeline for testing
Our testing pipeline will consist of two jobs that should do the following:
- Run all code checks such as linting, type checking, unit and integration testing, and so on
- Build the application and run end-to-end tests
Code checks job
The code checks job should work as shown in the following diagram:
Figure 9.2 – Code checks job overview
As we can see, the job should be straightforward:
- First, we need to provide environment variables to the application.
- Then, we need to install the dependencies.
- Next, we must run unit and integration tests.
- Then, we must run linting.
- After, we must check the code format.
- Finally, we must run type checking.
Within jobs
, let’s add the job that runs these tasks:
jobs: code-checks: name: Code Checks runs-on: ubuntu-latest steps: ...