Widget e2e testing #4
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: Widget e2e testing | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ $default-branch ] | |
pull_request: | |
branches: [ $default-branch ] | |
jobs: | |
cypress: | |
defaults: | |
run: | |
working-directory: widget | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm install | |
- run: npm run build | |
env: | |
NODE_ENV: production | |
- name: Run project locally | |
run: | | |
npm install serve | |
npx serve dist -s -p 8080 & | |
- name: Run tests | |
uses: cypress-io/github-action@v2 | |
with: | |
working-directory: widget | |
browser: chrome | |
headless: true |