mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 13:01:40 +02:00
Merge pull request #5567 from penpot/juanfran-add-component-testing-to-ci
✨ add component testing to CI
This commit is contained in:
commit
a5b2f0e4c3
3 changed files with 2933 additions and 32 deletions
|
@ -92,6 +92,45 @@ jobs:
|
||||||
- ~/.m2
|
- ~/.m2
|
||||||
key: v1-dependencies-{{ checksum "frontend/deps.edn"}}
|
key: v1-dependencies-{{ checksum "frontend/deps.edn"}}
|
||||||
|
|
||||||
|
test-components:
|
||||||
|
docker:
|
||||||
|
- image: penpotapp/devenv:latest
|
||||||
|
|
||||||
|
working_directory: ~/repo
|
||||||
|
resource_class: medium+
|
||||||
|
|
||||||
|
environment:
|
||||||
|
JAVA_OPTS: -Xmx6g -Xms2g
|
||||||
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
|
||||||
|
# Download and cache dependencies
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- v1-dependencies-{{ checksum "frontend/deps.edn"}}
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Install dependencies
|
||||||
|
working_directory: "./frontend"
|
||||||
|
command: |
|
||||||
|
yarn
|
||||||
|
npx playwright install --with-deps
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Build Storybook
|
||||||
|
working_directory: "./frontend"
|
||||||
|
command: yarn run build:storybook
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Serve Storybook and run tests
|
||||||
|
working_directory: "./frontend"
|
||||||
|
command: |
|
||||||
|
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
|
||||||
|
"npx http-server storybook-static --port 6006 --silent" \
|
||||||
|
"npx wait-on tcp:6006 && yarn test:storybook"
|
||||||
|
|
||||||
test-integration:
|
test-integration:
|
||||||
docker:
|
docker:
|
||||||
- image: penpotapp/devenv:latest
|
- image: penpotapp/devenv:latest
|
||||||
|
@ -234,6 +273,7 @@ workflows:
|
||||||
penpot:
|
penpot:
|
||||||
jobs:
|
jobs:
|
||||||
- test-frontend
|
- test-frontend
|
||||||
|
- test-components
|
||||||
- test-integration
|
- test-integration
|
||||||
- test-backend
|
- test-backend
|
||||||
- test-common
|
- test-common
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
"lint:scss:fix": "yarn run prettier -c resources/styles -c src/**/*.scss -w",
|
"lint:scss:fix": "yarn run prettier -c resources/styles -c src/**/*.scss -w",
|
||||||
"build:test": "clojure -M:dev:shadow-cljs compile test",
|
"build:test": "clojure -M:dev:shadow-cljs compile test",
|
||||||
"test": "yarn run build:test && node target/tests/test.js",
|
"test": "yarn run build:test && node target/tests/test.js",
|
||||||
|
"test:storybook": "test-storybook",
|
||||||
"watch:test": "mkdir -p target/tests && concurrently \"clojure -M:dev:shadow-cljs watch test\" \"nodemon -C -d 2 -w target/tests --exec 'node target/tests/test.js'\"",
|
"watch:test": "mkdir -p target/tests && concurrently \"clojure -M:dev:shadow-cljs watch test\" \"nodemon -C -d 2 -w target/tests --exec 'node target/tests/test.js'\"",
|
||||||
"test:e2e": "playwright test --project default",
|
"test:e2e": "playwright test --project default",
|
||||||
"translations": "node ./scripts/translations.js",
|
"translations": "node ./scripts/translations.js",
|
||||||
|
@ -56,6 +57,7 @@
|
||||||
"@storybook/react": "^8.4.6",
|
"@storybook/react": "^8.4.6",
|
||||||
"@storybook/react-vite": "^8.4.6",
|
"@storybook/react-vite": "^8.4.6",
|
||||||
"@storybook/test": "^8.4.6",
|
"@storybook/test": "^8.4.6",
|
||||||
|
"@storybook/test-runner": "^0.21.0",
|
||||||
"@types/node": "^22.7.7",
|
"@types/node": "^22.7.7",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"concurrently": "^9.0.1",
|
"concurrently": "^9.0.1",
|
||||||
|
|
2923
frontend/yarn.lock
2923
frontend/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue