Each snippet typically installs dependencies (with caching), runs tests and publishes new version to NPM and GitHub using semantic-release.
GitHub Actions
1 | name: ci |
Example repositories print-env, make-empty-github-commit.
Read more about GitHub Actions in Trying GitHub Actions blog post. If you are doing Cypress End-to-end tests, I recommend using Cypress GitHub Action.
Tip: when using NPM module caching, Do Not Let NPM Cache Snowball on CI.
CircleCI
1 | version: 2.1 |
Example repositories term-to-html, bahmutov/cypress-realworld-app.
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/
Emoji
In the code samples above I am using emoji to quickly see each step.
Emoji | Step |
---|---|
๐ |
Code check out from the repo |
๐ฆ |
Installing and caching dependencies |
๐งน |
Linting source code |
๐งฉ |
Checking types, for example using tsc --noEmit |
๐ |
Running Prettier formatter |
๐ฆ |
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.