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

chore(test-runner): Adding basic conf, including CI #3749

Draft
wants to merge 5 commits into
base: v5-dev
Choose a base branch
from
Draft
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
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ jobs:
NETLIFY: true
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
- name: Install Playwright
run: npx playwright install --with-deps
- name: Run Storybook tests in EC
run: yarn test-storybook
env:
TARGET_URL: https://ecl-preview-${{ github.event.number }}--europa-component-library.netlify.app/playground/ec
- name: Run Storybook tests in EU
run: yarn test-storybook
env:
TARGET_URL: https://ecl-preview-${{ github.event.number }}--europa-component-library.netlify.app/playground/eu
deploy-release-branch:
name: deploy release branch
runs-on: ubuntu-latest
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/storybook-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Storybook Tests

on: deployment_status

jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
if: github.event.deployment_status.state == 'success'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn
- name: Install Playwright
run: npx playwright install --with-deps
- name: Run Storybook tests in EC
run: yarn test-storybook
env:
TARGET_URL: '${{ github.event.deployment_status.target_url }}/playground/ec'
- name: Run Storybook tests in EU
run: yarn test-storybook
env:
TARGET_URL: '${{ github.event.deployment_status.target_url }}/playground/eu'
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"start:website": "cd src/website && npm run start",
"test": "run-p test:*",
"test:components": "jest --verbose",
"test-storybook": "test-storybook",
"test:coding-conventions": "npm run lint && npm run pretty-check",
"update-version": "scripts/update-version.sh"
},
Expand All @@ -39,6 +40,7 @@
"@babel/plugin-transform-runtime": "7.25.9",
"@prettier/plugin-xml": "3.4.1",
"@size-limit/preset-big-lib": "11.1.6",
"@storybook/test-runner": "0.20.1",
"babel-jest": "29.7.0",
"classnames": "2.5.1",
"eslint": "8.57.0",
Expand Down
Loading
Loading