Release 4.0.0 #553
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is reference workflow to run e2e tests and get test results | |
name: e2e-tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
e2e-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Read .nvmrc | |
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
id: nvmrc | |
- name: setup node ${{ steps.nvmrc.outputs.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '${{ steps.nvmrc.outputs.NODE_VERSION }}' | |
registry-url: 'https://registry.npmjs.org' | |
# added to build react-storybook for testing | |
- name: install dependencies | |
run: | | |
yarn config set network-timeout 300000 | |
yarn | |
- name: build design tokens package | |
run: yarn build | |
working-directory: ./packages/design-tokens | |
- name: build core package | |
run: yarn build | |
working-directory: ./packages/core | |
- name: build core storybook | |
run: yarn build-storybook | |
working-directory: ./packages/core | |
- name: build react package | |
run: yarn build | |
working-directory: ./packages/react | |
- name: build react storybook | |
run: yarn build-storybook | |
working-directory: ./packages/react | |
# added to build react-storybook for testing | |
- name: install dependencies | |
run: | | |
yarn config set network-timeout 300000 | |
yarn | |
working-directory: ./e2e | |
- name: install playwright browser and OS dependencies | |
run: | | |
yarn playwright-install | |
working-directory: ./e2e | |
- name: run tests | |
run: | | |
yarn start | |
env: | |
E2E_TESTS_ENV_URL: 'https://hds.hel.fi' | |
working-directory: ./e2e | |
- name: upload test results in case of failure | |
uses: actions/upload-artifact@v4 | |
with: | |
name: e2e_test_report | |
path: e2e/report/ | |
include-hidden-files: true | |
if: failure() | |
- name: upload screenshot differences in case of failure | |
uses: actions/upload-artifact@v4 | |
with: | |
name: e2e_test_results | |
path: e2e/test-results/ | |
if: failure() | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: | | |
e2e/report/**/*.xml |