Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.8 KB

ACTIONS_README.md

File metadata and controls

26 lines (18 loc) · 1.8 KB

CI with GitHub actions 

   We have decided to adopt GitHub Actions as our framework for continuous integration. We have implemented two workflows. The PR Creation workflow installs, builds, and tests the application. The Merge workflow installs, builds, and deploys the application to NPM.

Refactoring the workflows

   The PR Creation targets the pull_request event on the master branch. The workflow depends on Node and MongoDB. The build-and-test job has a MongoDB step which uses a custom action supercharge/[email protected] and is needed to be able to run unit tests during the build process.

   The Merge will deploy a new version of the application to NPM, but it requires access to the proper security token in NPM, and will therefore only run in the GitHub environment. The action targets the push event on the master branch, which is in effect what happens when a PR is merged into the master branch.

Testing workflows in local environments

   It is advisable for one to test a workflow before creating a PR. To test workflows locally we recommend using the act tool. You can install act by following the instructions provided here. To use act you need docker, we recommend following the instructions here to install docker.

Additional information

   To learn more about GitHub actions visit the documentation website . In the PR Creation workflow, we used a custom action to instantiate a MongoDB instance, you can find additional custom actions here.