Skip to content
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
9 changes: 9 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ orbs:
browser-tools: circleci/browser-tools@1.1.3
# used to enable slack integration (required api key set in environment)
slack: circleci/slack@4.4.2
# used to track coverage
codecov: codecov/codecov@3.2.4

######################################################################################################
# Aliases - code snippets that can be included inline in any other markup
Expand Down Expand Up @@ -284,6 +286,12 @@ jobs:
- run:
# NOTE - run-in-band to try reduce memory leaks (https://github.com/facebook/jest/issues/7874)
command: yarn run test:unit:ci && yarn run test:components
- store_artifacts:
path: coverage
- store_artifacts:
path: packages/components/coverage
- codecov/upload

test_circular_dependency:
docker: *docker
steps:
Expand All @@ -295,6 +303,7 @@ jobs:
command: yarn workspaces focus one-army-community-platform
- run:
command: yarn run test:madge

build:
<<: *docker_matrix
environment:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"test": "yarn workspace oa-cypress start",
"test:components": "yarn workspace oa-components test",
"test:unit": "env-cmd -e cra craco test --env=jsdom",
"test:unit:ci": "yarn build:themes && yarn build:components && env-cmd -e cra craco test --env=jsdom --runInBand --logHeapUsage",
"test:unit:ci": "yarn build:themes && yarn build:components && env-cmd -e cra craco test --env=jsdom --runInBand --logHeapUsage --coverage",
"test:madge": "npx madge --circular --extensions ts,tsx ./ --exclude src/stores",
"storybook": "yarn workspace oa-components start",
"storybook:build": "yarn build:themes && yarn workspace oa-components build:sb",
Expand Down
3 changes: 2 additions & 1 deletion packages/components/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
storybook-static
dist
dist
coverage
5 changes: 3 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dev": "tsc --watch",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx src --color",
"new-component": "ts-node scripts/newComponent.ts",
"test": "vitest"
"test": "vitest --coverage"
},
"dependencies": {
"@emotion/react": "^11.10.6",
Expand Down Expand Up @@ -56,6 +56,7 @@
"@types/react-flag-icon-css": "^1.0.5",
"@types/react-portal": "^4.0.4",
"@vitejs/plugin-react": "^3.1.0",
"@vitest/coverage-c8": "^0.30.1",
"babel-loader": "8.1.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.4",
Expand All @@ -67,6 +68,6 @@
"react-dom": "^17.0.2",
"ts-node": "^10.7.0",
"typescript": "^4.5.5",
"vitest": "^0.29.5"
"vitest": "^0.30.1"
}
}
4 changes: 4 additions & 0 deletions packages/components/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ export default defineConfig({
environment: 'jsdom',
globals: true,
setupFiles: './src/tests/setup.ts',
coverage: {
provider: 'c8',
reporter: ['text', 'json', 'html'],
},
},
})
Loading