Creating useful CI pipelines for the development process
Again, we’ll use our example project here. First, we’ll set up a pipeline that can support us during the development process with very simple checks for Step 3 of Figure 11.3. We’ll use GitHub Actions to execute this CI pipeline, but it works very similar with Bitbucket (https://bit.ly/prn-bitbucket-pipelines) and GitLab CI/CD (https://bit.ly/prn-gitlab-cicd).
First, we have to create the scripts we want to use in our pipelines. In our example, we want to run type checking with the TypeScript compiler and static code analysis with ESLint and Prettier to ensure the correct code styling is in place.
For this, we’ll provide the following scripts in the scripts
section of our package.json
file:
"typecheck": "tsc --noEmit", "lint": "eslint ./src", "prettier": "prettier ./src --check",
Next, we have to create a workflow file that can...