Skip to content

Commit

Permalink
Merge pull request #350 from chromaui/set-up-codecov
Browse files Browse the repository at this point in the history
Set up Codecov
  • Loading branch information
paulelliott authored Jan 15, 2025
2 parents 871413f + 8499c6a commit a7a43da
Show file tree
Hide file tree
Showing 5 changed files with 398 additions and 361 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ jobs:

- name: Test
run: yarn test

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ build-storybook.log
chromatic.log
chromatic-build-*.xml
chromatic-diagnostics.json
coverage/

**/.pnp.*
**/.yarn/*
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"start": "run-p build:watch 'storybook --quiet'",
"storybook": "CHROMATIC_ADDON_NAME='../src/dev.ts' storybook dev -p 6004",
"storybook-from-dist": "CHROMATIC_USE_DIST_VERSION=true CHROMATIC_ADDON_NAME='../dist/index.js' storybook dev -p 6004",
"test": "vitest",
"test": "vitest --coverage",
"typecheck": "tsc --noemit"
},
"resolutions": {
Expand Down Expand Up @@ -96,6 +96,7 @@
"@typescript-eslint/parser": "^5.59.11",
"@urql/exchange-auth": "^2.1.6",
"@vitejs/plugin-react": "^3.1.0",
"@vitest/coverage-v8": "^2.1.8",
"auto": "^11.0.5",
"boxen": "^5.0.1",
"date-fns": "^2.30.0",
Expand Down Expand Up @@ -126,7 +127,7 @@
"vite": "^4.1.4",
"vite-plugin-environment": "^1.1.3",
"vite-plugin-turbosnap": "^1.0.3",
"vitest": "^1.3.1",
"vitest": "^2.1.8",
"zod": "^3.22.2",
"zx": "^1.14.1"
},
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ const CHROMATIC_BASE_URL = process.env.CHROMATIC_BASE_URL || "https://www.chroma
export default defineConfig({
define: { "process.env": { CHROMATIC_BASE_URL } },
plugins: [react(), EnvironmentPlugin({ CHROMATIC_BASE_URL })],
coverage: {
provider: "v8",
},
});
Loading

0 comments on commit a7a43da

Please sign in to comment.