E2E Regression #584
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 Testing Schedule' | |
on: | |
schedule: | |
- cron: '*/20 1-12 * * *' | |
- cron: '0 13 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
network: ['Ethereum', 'Arbitrum', 'Optimism', 'Avalanche', 'BNB'] | |
steps: | |
- name: Trigger Code Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Node.js 18.15.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.15.0 | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@kybernetwork' | |
- name: Install dependences | |
uses: bahmutov/npm-install@HEAD | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GH_PAT }} ### authen npm | |
- name: Install linux deps | |
run: | | |
sudo apt-get install --no-install-recommends -y \ | |
fluxbox \ | |
xvfb | |
- name: Install cypress | |
run: yarn cypress install --force | |
- name: Run xvfb and fluxbox | |
run: Xvfb :0 -screen 0 1024x768x24 -listen tcp -ac & | |
fluxbox & | |
env: | |
DISPLAY: :0.0 | |
- name: Create env file | |
run: | | |
touch .env | |
echo ENV=${ENV} > .env | |
echo GITHUB_RUN_ID=${GITHUB_RUN_ID} > .env | |
echo CORE_PUSH_GATEWAY_URL=${{ secrets.CORE_PUSH_GATEWAY_URL }} > .env | |
- name: Run Cypress Test | |
run: |+ | |
#!/bin/bash | |
yarn test-schedule -c baseUrl='https://kyberswap.com/' -e grepTags=regression,NETWORK=${{ matrix.network }} | |
env: | |
DISPLAY: :0.0 | |
- name: Archive e2e artifacts | |
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 | |
if: always() | |
with: | |
name: e2e-artifacts | |
path: | | |
cypress/videos | |
cypress/screenshots | |
continue-on-error: true |