From 343d2e63d7504d6229056a3ef1a942ed3ee0f79d Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Fri, 13 Oct 2017 11:42:16 +0300 Subject: [PATCH] Add CI docs --- docs/README.md | 8 +++++++- docs/ci.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 docs/ci.md diff --git a/docs/README.md b/docs/README.md index 89bdaafd..c5f1ccc3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,9 +1,15 @@ # Sharetribe Starter App Documentation -The application was bootstrapped with a forked version of [create-react-app](https://github.com/facebookincubator/create-react-app). While most of the original documentation still apply, there are some important differences listed in the [sharetribe-scripts](https://www.npmjs.com/package/sharetribe-scripts) NPM package. +The application was bootstrapped with a forked version of +[create-react-app](https://github.com/facebookincubator/create-react-app). While +most of the original documentation still apply, there are some +important differences listed in the +[sharetribe-scripts](https://www.npmjs.com/package/sharetribe-scripts) +NPM package. Documentation for specific topics can be found in the following files: - Original [create-react-app documentation](create-react-app.md) - [Testing](testing.md) - [Error logging with Sentry](sentry.md) + - [CI](ci.md) diff --git a/docs/ci.md b/docs/ci.md new file mode 100644 index 00000000..ca2ecacd --- /dev/null +++ b/docs/ci.md @@ -0,0 +1,35 @@ +# CI + +The application provides a configuration to use +[CircleCI](https://circleci.com/) as a continuous integration server +to run tests and other scripts. This ensures quality and can be forced +to avoid merging changes that break tests or fail audits. + +The [circle.yml](../circle.yml) file is used to configure CircleCI. + +Currently the CI runs the following scripts: + +## Security audit: `yarn run audit` + +This command runs the security audit using +[nsp](https://www.npmjs.com/package/nsp). The audit checks for +installed packages with known vulnerabilities and warns about those. + +The scripts outputs information about the dependency path that added +the package. If that information is not enough, `yarn why +package-name` can be used to get more detailed information about why +the package is installed. + +## Code formatting: `yarn run format-ci` + +This command fails if there are changes in the formatting that are not +committed. Run `yarn run format` to format the code and get rid of the +error. + +## Build: `yarn run build` + +This command ensures that the build passes. + +## Tests: `yarn run test-ci` + +This command runs the tests.