setup cypress end-to-end testing #1
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: E2E Tests Cypress | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
e2e-tests: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
strategy: | |
matrix: | |
browser: ["chrome", "firefox"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare Node environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install and build packages | |
run: bash plotly-custom-build.sh | |
- name: Cypress run | |
uses: cypress-io/github-action@v5 | |
with: | |
browser: ${{ matrix.browser }} | |
start: npm start | |
wait-on: "http://localhost:3000" | |
wait-on-timeout: 300 |