Skip to content

Commit

Permalink
switch to coveralls coverage reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielburnworth committed Jan 17, 2024
1 parent b050710 commit 2646804
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
10 changes: 8 additions & 2 deletions .circleci/config.yml
Expand Up @@ -88,10 +88,16 @@ commands:
- run:
name: Report coverage to Coveralls
command: |
if [ "$COVERAGE_AVAILABLE" ]
if [ "$CIRCLE_BRANCH" == "staging" ]; then set +eo pipefail; fi
if [ "$COVERAGE_AVAILABLE" ] && [ "$COVERALLS_REPO_TOKEN" ]
then
sudo docker compose run -e COVERALLS_REPO_TOKEN="$COVERALLS_REPO_TOKEN" web npm run coverage || [ $CIRCLE_BRANCH == "staging" ]
curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-linux.tar.gz
curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-checksums.txt
cat coveralls-checksums.txt | grep coveralls-linux.tar.gz | sha256sum --check
tar -xzf coveralls-linux.tar.gz
./coveralls report coverage_fe/lcov.info
fi
if [ "$CIRCLE_BRANCH" == "staging" ]; then echo; fi
when: always # change to `on_success` for a stricter comparison


Expand Down
2 changes: 0 additions & 2 deletions package.json
Expand Up @@ -13,7 +13,6 @@
"url": "https://github.com/farmbot/farmbot-web-app"
},
"scripts": {
"coverage": "cat **/*lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"test-very-slow": "node --expose-gc ./node_modules/.bin/jest -i --colors --coverage",
"test-slow": "./node_modules/.bin/jest -w 6 --colors",
"test": "./node_modules/.bin/jest -w 5 --no-coverage",
Expand Down Expand Up @@ -85,7 +84,6 @@
"@typescript-eslint/eslint-plugin": "6.16.0",
"@typescript-eslint/parser": "6.16.0",
"@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
"coveralls": "3.1.1",
"enzyme": "3.11.0",
"eslint": "8.56.0",
"eslint-plugin-eslint-comments": "3.2.0",
Expand Down
5 changes: 1 addition & 4 deletions run_all_ci_tasks.sh
Expand Up @@ -9,7 +9,4 @@ P2=$!
sudo docker compose run web npm run test-slow &
P3=$!

sudo docker compose run web npm run coverage &
P4=$!

wait $P1 $P2 $P3 $P4
wait $P1 $P2 $P3

0 comments on commit 2646804

Please sign in to comment.