Each snippet typically installs dependencies (with caching), runs tests and publishes new version to NPM and GitHub using semantic-release.
Tip: when using NPM module caching, Do Not Let NPM Cache Snowball on CI.
Tip: the badge for specific branch is:
[![ci status][ci image]][ci url]
If you are doing Cypress End-to-end tests, I recommend using Cypress CircleCI Orb
Tip: form the CircleCI project badge URL using https://circleci.com/docs/2.0/status-badges/, the format for specific branch is:
[![CircleCI](https://circleci.com/gh/bahmutov/<repo name>/tree/<branch name>.svg?style=svg)](https://circleci.com/gh/bahmutov/<repo name>/tree/<branch name>)
In the code samples above I am using emoji to quickly see each step.
🛎| Code check out from the repo
📦| Installing and caching dependencies
🧹| Linting source code
🧩| Checking types, for example using `tsc --noEmit`
💅| Running [Prettier formatter](./configure-prettier-in-vscode/)
🚦| Some sanity check before continuing
🏗| Building application
🚛| Moving or preparing application
🗑| Delete file or folder
🧪| Running tests
💨| Running smoke tests
📊| Running a demo step
📈| Check code coverage
🚀| Releasing a new version
Here is how it looks in GitHub Actions
Note: please do not use emoji in the job names - otherwise your GitHub commit status checks will stop working.