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

[core] Enable the CI #12

Merged
merged 14 commits into from
Apr 16, 2024
76 changes: 38 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ jobs:
- run:
name: Tests fake browser
command: pnpm build && pnpm test:coverage:ci
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the script to include the building

- run:
name: Check coverage generated
command: |
if ! [[ -s coverage/lcov.info ]]
then
exit 1
fi
# - run:
mnajdova marked this conversation as resolved.
Show resolved Hide resolved
# name: Check coverage generated
# command: |
# if ! [[ -s coverage/lcov.info ]]
# then
# exit 1
# fi
- run:
name: Coverage
command: |
Expand Down Expand Up @@ -259,37 +259,37 @@ jobs:
# We assume that the target branch is `next` and that declaration files are persisted in commit order.
# "If there are multiple matches, the most recently generated cache will be used."
- typescript-declaration-files-next
test_browser:
<<: *default-job
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.43.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
browsers: true
- run:
name: Tests real browsers
command: pnpm test:karma
- run:
name: Check coverage generated
command: |
if ! [[ -s coverage/lcov.info ]]
then
exit 1
fi
- run:
name: Coverage
command: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_VERSION-browser"
- store_artifacts:
# hardcoded in karma-webpack
path: /tmp/_karma_webpack_
destination: artifact-file
# test_browser:
mnajdova marked this conversation as resolved.
Show resolved Hide resolved
# <<: *default-job
# resource_class: 'medium+'
# docker:
# - image: mcr.microsoft.com/playwright:v1.43.0-focal
# environment:
# NODE_ENV: development # Needed if playwright is in `devDependencies`
# steps:
# - checkout
# - install_js:
# browsers: true
# - run:
# name: Tests real browsers
# command: pnpm test:karma
# - run:
# name: Check coverage generated
# command: |
# if ! [[ -s coverage/lcov.info ]]
# then
# exit 1
# fi
# - run:
# name: Coverage
# command: |
# curl -Os https://uploader.codecov.io/latest/linux/codecov
# chmod +x codecov
# ./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_VERSION-browser"
# - store_artifacts:
# # hardcoded in karma-webpack
# path: /tmp/_karma_webpack_
# destination: artifact-file
test_profile:
<<: *default-job
docker:
Expand Down
23 changes: 23 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to add this in the previous PR.

"buildCommand": "build:codesandbox",
"installCommand": "install:codesandbox",
"node": "18",
"packages": [
"packages/pigment-css-react",
"packages/pigment-css-unplugin",
"packages/pigment-css-nextjs-plugin",
"packages/pigment-css-vite-plugin"
],
"publishDirectory": {
"@pigment-css/react": "packages/pigment-css-react/build",
"@pigment-css/unplugin": "packages/pigment-css-unplugin/build",
"@pigment-css/nextjs-plugin": "packages/pigment-css-nextjs-plugin/build",
"@pigment-css/vite-plugin": "packages/pigment-css-vite-plugin/build"
},
"sandboxes": [
"/examples/pigment-css-nextjs-ts",
"/examples/pigment-css-remix-ts",
"/examples/pigment-css-vite-ts"
],
"silent": true
}
2 changes: 1 addition & 1 deletion test/karma.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import '@mui/internal-test-utils/init';
import '@mui/internal-test-utils/setupKarma';

const pigmentCssContext = require.context(
'../packages/pigment-css-react/src/',
'../packages/pigment-css-react/tests/',
true,
/\.test\.(js|ts|tsx)$/,
);
Expand Down