E2E Tests #5927
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 | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: | |
- 'develop' | |
- 'staging' | |
- 'v**' | |
pull_request: | |
jobs: | |
e2e_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v2-beta | |
with: | |
node-version: 16 | |
- name: Cypress install | |
uses: cypress-io/github-action@v4 | |
with: | |
runTests: false | |
- name: Cypress info | |
run: npx cypress info | |
- name: Cypress run | |
uses: cypress-io/[email protected] | |
with: | |
install: false | |
build: npm run build | |
start: npm start | |
wait-on: 'http://localhost:3000' | |
wait-on-timeout: 120 | |
config-file: cypress.json | |
command: npm run cypress:run | |
env: | |
NEXT_PUBLIC_SERVER_ENDPOINT: ${{ secrets.NEXT_PUBLIC_SERVER_ENDPOINT_FOR_E2E }} | |
NEXT_PUBLIC_WS_URL: ${{ secrets.NEXT_PUBLIC_WS_URL }} | |
NEXT_PUBLIC_CHAIN_TYPE: ${{ secrets.NEXT_PUBLIC_CHAIN_TYPE }} | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: cypress-videos | |
path: cypress/videos | |
- name: Upload Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |