Continuous Integration

There are several jobs that run on each push on GitHub actions.

  • Lint - runs ESLint against the codebase. Will note any issues with the code style such as missing semi-colons or too many nested callbacks.

  • Test - runs our jest unit tests.

  • Check Types - runs the Typescript compiler against the codebase. Will not any issues with improper types or unused variables.

  • Check Build - builds the application to ensure that it build properly.

Troubleshooting

The CI/lint job keeps failing

An easy way to fix this error is by auto-fixing any ESLint errors. This can be done by running npm run style:fix. If this doesn't fix the error, there should be some output from the previous command that explains what the error is that cannot be autofixed.

A common ESLint error that cannot be auto fixed is magic numbers. This refers to a number (other than 0, 1, -1, or 2) that is not referenced by a variable name.

magic_nums_example.ts
setTimeout(() => console.log('six seconds passed'), 6000); // bad

const SIX_SECOND_DELAY = 6000;
setTimeout(() => console.log('six seconds passed'), SIX_SECOND_DELAY); // good

The CI/check build job keeps failing

This is common when there is a function or an import that is defined but was not used. To fix this, simply remove the unused dependency or unused variables/function.

Last updated