From 8ff4ea79fed6f2acece3e12557fc81e1b502be46 Mon Sep 17 00:00:00 2001 From: Arturo Riveron Borovisina Date: Mon, 14 Feb 2022 15:44:03 -0500 Subject: [PATCH] feat(codecov): enhance the codecov report (#112) --- .github/codecov.yml | 13 +++++++++++++ .github/workflows/main.yml | 8 ++++---- package.json | 3 ++- 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 .github/codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 00000000..e4e77af5 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,13 @@ +coverage: + status: + project: + default: + target: 50% + client: + target: 50% + flags: + - client + server: + target: 100% + flags: + - server diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c2d796ec..e76ebaf1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,14 +29,14 @@ jobs: - name: ▶️ Run build script run: npm run build - - name: ⬆️ Upload karma coverage report + - name: ⬆️ Upload client coverage report uses: codecov/codecov-action@v2 with: directory: ./coverage/karma - flags: karma + flags: client - - name: ⬆️ Upload jest coverage report + - name: ⬆️ Upload server coverage report uses: codecov/codecov-action@v2 with: directory: ./coverage/jest - flags: jest + flags: server diff --git a/package.json b/package.json index 90287674..60238ef3 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "webpack": "babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/webpack --progress", "jest": "jest test/server --env=node --no-cache --collectCoverageFrom='server/' --coverageDirectory='coverage/jest' --coverage --verbose --runInBand --silent=false", "prepublishOnly": "npm run babel", - "postpublish": "rm -rf ./server && git checkout ./server" + "postpublish": "rm -rf ./server && git checkout ./server", + "validate-codecov": "curl --data-binary @.github/codecov.yml https://codecov.io/validate" }, "files": [ "dist/",