Current project solves advent of code challenges, the main goal is to practice data structures and algorithms. Apart from solving coding challenges the project also has some tools integrated to be able to develop and run challenges smoothly, do static code analysis, and check for code vulnerabilities to ensure code quality. Below are the topics we are going to cover in the current documentation.
The project has mocha set up to test the application, currently, there are only unit test, and even though mocha features are allowed to be use the project uses node built-in assert module to test the code.
To check code coverage the project uses c8, use to generate the coverage report which is later upload to Codecov.
Continuous integration and deployment is done by using github actions, the workflow currently have steps for code linting, tests, check code vulnerabilities, report code coverage, and deploy the code. Checkout the workflow for details.
Here are the github integrations done for some workflow steps to work.
- to check secutiry vulnerabilities, an integration was set with Snyk.
- to check code coverage, an integration was set with Codecov.
- In order to host the application, and integration was set with render.
The tools the project uses for static code analysis are Snyk, and eslint.
yarn lint
- checks for code linting warnings, and errors
yarn dev:server
- runs a server to expose the project API in development
yarn dev:challenges
- runs challenges in development
yarn start
- runs a server to expose the project API in production
yarn test
- runs unit tests
yarn test:watch
- runs unit tests in watch mode
yarn coverage
- checks tests coverage