From 55de24db3f8df94cd95f2b428a50c1789766ab69 Mon Sep 17 00:00:00 2001 From: andrzejewsky Date: Tue, 11 Feb 2025 11:58:09 +0100 Subject: [PATCH 1/3] Add codecov --- .github/workflows/test.yml | 10 ++++++++-- package.json | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de2d5749014..d3ee07e651f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,6 @@ name: QA -on: [pull_request] +on: push jobs: check-lock: @@ -72,7 +72,13 @@ jobs: - name: Run jest run: | - npm run test + npm run test:ci + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: saleor/saleor-dashboard translation-messages: runs-on: ubuntu-latest diff --git a/package.json b/package.json index 623820b5a8f..b0b0d0cb220 100644 --- a/package.json +++ b/package.json @@ -261,6 +261,7 @@ "serve:lhci": "cross-env NODE_ENV=production npm run server", "prestart": "npm run build-types", "test": "jest src/", + "test:ci": "jest src/ --coverage", "test:watch": "jest --watch src/", "lint": "eslint \"{src,playwright}/**/*.@(tsx|ts|jsx|js)\" --fix", "lint:check-progress": "eslint-nibble \"src/**/*.@(tsx|ts|jsx|js)\"", From 77ee912ff130742283b5dce5d1a0e22f20a4c545 Mon Sep 17 00:00:00 2001 From: andrzejewsky Date: Tue, 11 Feb 2025 11:58:37 +0100 Subject: [PATCH 2/3] Add codecov --- .changeset/pink-keys-cry.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/pink-keys-cry.md diff --git a/.changeset/pink-keys-cry.md b/.changeset/pink-keys-cry.md new file mode 100644 index 00000000000..91cb149d3dc --- /dev/null +++ b/.changeset/pink-keys-cry.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Now the test coverage is being raported and tracked From 8307723814727d2ba7f7d9234e9a2ff3a2878ad4 Mon Sep 17 00:00:00 2001 From: andrzejewsky Date: Tue, 11 Feb 2025 12:08:41 +0100 Subject: [PATCH 3/3] Add codecov --- codecov.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000000..73dca6a7efd --- /dev/null +++ b/codecov.yml @@ -0,0 +1,8 @@ +coverage: + status: + project: + default: + target: auto + +ignore: + - "src/graphql/**"