All of these templates include:
- Running tests on any commit push via
on: push: - Avoids caching
node_modulesand instead relies on quick installs vianpm ci(package-lock.jsonornpm-shrinkwrap.jsonrequired)) - Disabling npm logging except for errors with the
NPM_CONFIG_LOGLEVELandNPM_CONFIG_PROGRESSflags - Maximize node-gyp concurrency with the
NPM_CONFIG_JOBSflag - Caches eslint, stylelint, and jest artifacts to
node_modules/.cacheand saves it to the Action's cache - For eslint and stylelint, uses
.gitignoreas the ignore path instead of having more dot files - Sets the appropriate number of jest workers based on the test type given the fact that GitHub Actions allocates 2 cpus
- Code coverage reporting support via codecov.io and
npx codecov
In general, these templates only include the GitHub Action Workflow YAML file and jest config files.
Other templates:
- jonathanong/e2e - template for running E2E tests via puppeteer, jest, and GitHub Actions
- jonathanong/google-lighthouse-ci - template for running Google Lighthouse on a regular cadence via GitHub Actions