wip: Implementing New UI #6968
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
name: Node CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
# Note: Needs write permimission to upload __image_snapshots__ folder | |
permissions: | |
contents: write | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
outputs: | |
cms: ${{ steps.filter.outputs.cms }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
cms: | |
- '!website/**' | |
build: | |
needs: changes | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
node-version: [18.x, 20.x] | |
if: ${{ needs.changes.outputs.cms == 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js {{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
check-latest: true | |
- name: log versions | |
run: node --version && npm --version && yarn --version | |
- name: install dependecies | |
run: npm install | |
- name: run unit tests | |
run: npm run test:ci | |
env: | |
CI: true | |
NODE_OPTIONS: --max-old-space-size=4096 | |
- name: build demo site | |
run: npm run build:demo | |
env: | |
NODE_OPTIONS: --max-old-space-size=4096 | |
- uses: actions/upload-artifact@master | |
with: | |
name: dev-test-website-${{ runner.os }}-${{ matrix.node-version }} | |
path: dev-test | |
e2e-with-cypress: | |
needs: [changes, build] | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
fail-fast: false | |
if: ${{ needs.changes.outputs.cms == 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
check-latest: true | |
- uses: actions/download-artifact@master | |
with: | |
name: dev-test-website-${{ runner.os }}-18.x | |
path: dev-test | |
- name: npm install | |
run: | | |
node --version | |
npm --version | |
yarn --version | |
npm install | |
- name: e2e test | |
run: | | |
npm run test:e2e:run-ci | |
env: | |
IS_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
NODE_OPTIONS: --max-old-space-size=4096 | |
MACHINE_COUNT: 2 | |
MACHINE_INDEX: ${{ matrix.node-version }} | |
TZ: Europe/Amsterdam | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: cypress-results-${{ matrix.node-version }} | |
path: | | |
cypress/screenshots | |
cypress/videos | |
component-test-with-storybook: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js { matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
check-latest: true | |
- name: Install dependencies | |
run: npm install | |
- name: Install Playwright | |
run: npx playwright install --with-deps | |
- name: Build Storybook | |
run: npm run build:storybook | |
- name: Run component tests | |
run: npm run test:component |