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

Setup codecov #1711

Merged
merged 3 commits into from
Jan 24, 2025
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
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,9 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm test
run: pnpm test:ci
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@0da7aa657d958d32c117fc47e1f977e7524753c7 # v5.3.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: saleor/apps
4 changes: 3 additions & 1 deletion apps/avatax/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"migrate": "pnpm tsx --require dotenv/config ./scripts/run-webhooks-migration.ts",
"migrate:dry-run": "pnpm tsx --require dotenv/config ./scripts/run-webhooks-migration.ts --dry-run",
"start": "next start",
"test": "vitest --project units"
"test": "vitest --project units",
"test:ci": "vitest run --coverage --project units"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "3.651.1",
Expand Down Expand Up @@ -94,6 +95,7 @@
"@types/react": "18.2.5",
"@types/react-dom": "18.2.5",
"@vitejs/plugin-react": "4.3.1",
"@vitest/coverage-v8": "1.6.0",
"aws-sdk-client-mock": "4.0.1",
"eslint": "../../node_modules/eslint",
"eslint-config-saleor": "workspace:*",
Expand Down
4 changes: 3 additions & 1 deletion apps/cms-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"start": "next start",
"test": "vitest"
"test": "vitest",
"test:ci": "vitest run --coverage"
},
"dependencies": {
"@datocms/cma-client-browser": "2.0.0",
Expand Down Expand Up @@ -76,6 +77,7 @@
"@graphql-typed-document-node/core": "3.2.0",
"@testing-library/react": "^14.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@vitest/coverage-v8": "1.6.0",
"@types/qs": "^6.9.7",
"@types/react": "18.2.5",
"@types/react-dom": "18.2.5",
Expand Down
4 changes: 3 additions & 1 deletion apps/products-feed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"start": "next start",
"test": "vitest"
"test": "vitest",
"test:ci": "vitest run --coverage"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.332.0",
Expand Down Expand Up @@ -75,6 +76,7 @@
"@graphql-typed-document-node/core": "3.2.0",
"@testing-library/react": "^14.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@vitest/coverage-v8": "1.6.0",
"@types/react": "18.2.5",
"@types/react-dom": "18.2.5",
"eslint": "../../node_modules/eslint",
Expand Down
4 changes: 3 additions & 1 deletion apps/search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"lint:fix": "eslint --fix .",
"migrate": "pnpm tsx ./scripts/migrations/run-webhooks-migration.ts",
"start": "next start",
"test": "vitest"
"test": "vitest",
"test:ci": "vitest run --coverage"
},
"dependencies": {
"@hookform/resolvers": "^3.3.1",
Expand Down Expand Up @@ -74,6 +75,7 @@
"@types/react": "18.2.5",
"@types/react-dom": "18.2.5",
"@vitejs/plugin-react": "4.3.1",
"@vitest/coverage-v8": "1.6.0",
"eslint": "../../node_modules/eslint",
"eslint-config-saleor": "workspace:*",
"node-mocks-http": "^1.12.2",
Expand Down
4 changes: 3 additions & 1 deletion apps/segment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"migrate": "pnpm tsx --require dotenv/config ./scripts/run-webhooks-migration.ts",
"migrate:dry-run": "pnpm tsx --require dotenv/config ./scripts/run-webhooks-migration.ts --dry-run",
"start": "next start",
"test": "vitest"
"test": "vitest",
"test:ci": "vitest run --coverage"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "3.651.1",
Expand Down Expand Up @@ -84,6 +85,7 @@
"@types/react": "18.2.5",
"@types/react-dom": "18.2.5",
"@typescript-eslint/eslint-plugin": "7.15.0",
"@vitest/coverage-v8": "1.6.0",
"@typescript-eslint/parser": "7.15.0",
"aws-sdk-client-mock": "4.0.1",
"eslint": "../../node_modules/eslint",
Expand Down
4 changes: 3 additions & 1 deletion apps/smtp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"start": "next start",
"test": "vitest"
"test": "vitest",
"test:ci": "vitest run --coverage"
},
"dependencies": {
"@hookform/resolvers": "^3.3.1",
Expand Down Expand Up @@ -80,6 +81,7 @@
"@graphql-typed-document-node/core": "3.2.0",
"@testing-library/react": "^14.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@vitest/coverage-v8": "1.6.0",
"@types/handlebars-helpers": "^0.5.6",
"@types/html-to-text": "^9.0.0",
"@types/mjml": "4.7.4",
Expand Down
51 changes: 51 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
coverage:
status:
project:
default: off
app-avatax:
flags: [avatax]
app-cms:
flags: [cms]
app-products-feed:
flags: [products-feed]
app-search:
flags: [search]
app-segment:
flags: [segment]
app-smtp:
flags: [smtp]
packages-logger:
flags: [logger]
packages-shared:
flags: [shared]
packages-webhook-utils:
flags: [webhook-utils]

flags:
avatax:
paths:
- apps/avatax/
cms:
paths:
- apps/cms-v2/
products-feed:
paths:
- apps/products-feed/
search:
paths:
- apps/search/
segment:
paths:
- apps/segment/
smtp:
paths:
- apps/smtp/
logger:
paths:
- packages/logger/
shared:
paths:
- packages/shared/
webhook-utils:
paths:
- packages/webhook-utils/
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"prepare": "husky",
"start": "turbo run start",
"test": "turbo run test",
"test:ci": "turbo run test:ci",
"knip": "knip"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"check-types": "tsc --noEmit",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"test": "vitest"
"test": "vitest",
"test:ci": "vitest run --coverage"
},
"dependencies": {
"eslint": "../../node_modules/eslint",
Expand All @@ -16,6 +17,7 @@
"@saleor/app-sdk": "link:../../node_modules/@saleor/app-sdk",
"@sentry/nextjs": "../../node_modules/@sentry/nextjs",
"eslint-config-saleor": "workspace:*",
"@vitest/coverage-v8": "1.6.0",
"vite": "5.3.3",
"vitest": "1.6.0",
"modern-errors": "7.0.1",
Expand Down
4 changes: 3 additions & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"check-types": "tsc --noEmit",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"test": "vitest"
"test": "vitest",
"test:ci": "vitest run --coverage"
},
"dependencies": {
"@urql/exchange-auth": "2.1.4",
Expand All @@ -24,6 +25,7 @@
"react-dom": "18.2.0",
"typescript": "5.5.4",
"urql": "4.0.4",
"@vitest/coverage-v8": "1.6.0",
"vite": "5.3.3",
"vitest": "1.6.0",
"zod": "3.21.4"
Expand Down
4 changes: 3 additions & 1 deletion packages/webhook-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"generate": "graphql-codegen",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"test": "vitest"
"test": "vitest",
"test:ci": "vitest run --coverage"
},
"dependencies": {
"@saleor/app-sdk": "link:../../node_modules/@saleor/app-sdk",
Expand All @@ -32,6 +33,7 @@
"graphql-config": "5.0.3",
"typescript": "5.5.4",
"urql": "4.0.4",
"@vitest/coverage-v8": "1.6.0",
"vite": "5.3.3",
"vitest": "1.6.0"
},
Expand Down
Loading
Loading