Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APP-4064 ci(diff-coverage): add code climate to the ci config #209

Merged
merged 1 commit into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,40 @@ jobs:
- run: yarn
- run: yarn lint
- run: yarn check-circular
# Run jest tests
- run:
name: Run tests
command: yarn test-once
environment:
NODE_OPTIONS: --max_old_space_size=4096
# Run coverage
- run:
name: Run coverage
command: yarn run cover
environment:
NODE_OPTIONS: --max_old_space_size=4096
when: always
# Run coverage report for Code Climate
- run:
name: Setup Code Climate test-reporter
command: |
# download test reporter as a static binary
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
when: always
- run:
name: Send coverage report to Code Climate
command:
./cc-test-reporter after-build -t lcov
environment:
CC_TEST_REPORTER_ID: 8150d54c3d819c99c080dda0f89f8a0be0245ed8d9321f8054f8077883ba86c9
when: always
# Upload results
- store_artifacts: # upload test coverage as artifact
path: ./coverage/lcov.info
prefix: tests

- run: yarn build
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- run: bash ./publish.sh
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"build-storybook": "build-storybook -c .storybook -o dist/storybook",
"test": "jest --watchAll",
"test-once": "jest -w 1",
"cover": "jest -w 1 --coverage",
"check-circular": "madge --circular --extensions ts,tsx ./",
"linkit": "yarn build && cp package.json ./dist && cd ./dist && yarn link && cd .."
},
Expand Down