Skip to content

Merge branch '145-set-all-packagejson-dependencies-to-fixed-versions'… #576

Merge branch '145-set-all-packagejson-dependencies-to-fixed-versions'…

Merge branch '145-set-all-packagejson-dependencies-to-fixed-versions'… #576

Workflow file for this run

name: test
on: push
jobs:
# Temporarily commented out, until we set up a suitable e2e environment for running GitHub actions
# e2e:
# runs-on: ubuntu-latest
# environment: e2e
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: 'npm'
# - name: Install Dependencies
# run: npm install
# - name: Build Dataverse Design System
# working-directory: packages/design-system
# run: npm run build
# - name: Create and populate .env file
# env:
# DATAVERSE_BACKEND_URL: ${{ secrets.DATAVERSE_BACKEND_URL }}
# run: |
# touch .env
# echo VITE_DATAVERSE_BACKEND_URL="$DATAVERSE_BACKEND_URL" >> .env
# shell: bash
# - name: Cypress run
# uses: cypress-io/github-action@v4
# with:
# build: npm run build
# start: npm run preview
# wait-on: 'npx wait-on --timeout 60000 http://localhost:5173'
component:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Create .npmrc
run: |
cp .npmrc.example .npmrc
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
- name: Install Dependencies
run: npm install
- name: Build Dataverse Design System
working-directory: packages/design-system
run: npm run build
- name: Cypress run
uses: cypress-io/github-action@v4
with:
component: true
- name: Cypress run Design System
uses: cypress-io/github-action@v4
with:
project: packages/design-system
component: true
- name: Check coverage
run: npm run test:coverage-all
- name: Merge coverage
run: npm run test:coverage-merge
- name: Upload coverage report to Coveralls
if: always()
uses: coverallsapp/github-action@v2
with:
path-to-lcov: './merged-coverage/lcov.info'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Cypress screenshots
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-screenshots
path: ./cypress/screenshots
interaction-and-accessibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Create .npmrc
run: |
cp .npmrc.example .npmrc
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
- name: Install Dependencies
run: npm install
- name: Build Dataverse Design System
working-directory: packages/design-system
run: npm run build
- name: Build Storybook Design System
working-directory: packages/design-system
run: npm run build-storybook --quiet
- name: Serve Storybook Design System and run tests
working-directory: packages/design-system
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on http://127.0.0.1:6006 --l && npx test-storybook --url http://127.0.0.1:6006"
- name: Build Storybook
run: npm run build-storybook --quiet
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on http://127.0.0.1:6006 --l && npx test-storybook --url http://127.0.0.1:6006"