Skip to content

chore: Dispatch promotions repo instead of GitLab #1138

chore: Dispatch promotions repo instead of GitLab

chore: Dispatch promotions repo instead of GitLab #1138

Workflow file for this run

name: Safe Apps E2E
on:
pull_request:
push:
branches:
- development
- main
jobs:
e2e:
runs-on: ubuntu-latest
name: Execute E2E tests
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
with:
access_token: ${{ github.token }}
- name: Checkout web-core
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: safe-global/web-core
ref: main
path: web-core
- name: Yarn install web-core
working-directory: web-core
run: yarn install
- name: Yarn cache web-core modules
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: 'web-core/**/node_modules'
key: web-core-modules-${{ hashFiles('**/yarn.lock') }}
- name: Build web-core
working-directory: web-core
run: yarn build && yarn export
env:
NEXT_PUBLIC_INFURA_TOKEN: ${{ secrets.CYPRESS_INFURA_TOKEN }}
NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN: ${{ secrets.CYPRESS_INFURA_TOKEN }}
NEXT_PUBLIC_TENDERLY_ORG_NAME: ${{ secrets.REACT_APP_TENDERLY_ORG_NAME }}
NEXT_PUBLIC_TENDERLY_PROJECT_NAME: ${{ secrets.REACT_APP_TENDERLY_PROJECT_NAME }}
NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL: ${{ secrets.REACT_APP_TENDERLY_SIMULATE_ENDPOINT_URL }}
NEXT_PUBLIC_CYPRESS_MNEMONIC: ${{ secrets.CYPRESS_MNEMONIC }}
- name: Serve web-core
working-directory: web-core
run: |
yarn serve &
- name: Set PR Safe Apps base URL
run: |
echo "SAFE_APPS_BASE_URL=https://pr${{ github.event.number }}--safereactapps.review-react-hr.5afe.dev" >> $GITHUB_ENV
if: github.ref != 'refs/heads/development'
- name: Set development Safe Apps base URL
run: |
echo "SAFE_APPS_BASE_URL=https://safe-apps.dev.5afe.dev" >> $GITHUB_ENV
if: github.ref == 'refs/heads/development'
- name: Set main Safe Apps base URL
run: |
echo "SAFE_APPS_BASE_URL=https://apps-portal.safe.global" >> $GITHUB_ENV
if: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 9 * * 1-5' }}
- name: Checkout safe-react-apps
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: safe-global/safe-react-apps
path: apps
- name: Execute E2E tests
uses: cypress-io/github-action@948d67d3074f1bbb6379c8bdbb04e95d2f8e593f # v7.4.0
with:
browser: chrome
record: true
spec: cypress/e2e/drain-account/drain.spec.cy.js,cypress/e2e/tx-builder/tx-builder.spec.cy.js
wait-on: 'http://localhost:8080'
working-directory: apps
env:
CI: 'true'
CYPRESS_WEB_BASE_URL: 'http://localhost:8080'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_CHAIN_ID: '5'
CYPRESS_NETWORK_PREFIX: 'gor'
CYPRESS_TESTING_SAFE_ADDRESS: '0x168ca275d1103cb0a30980813140053c7566932F'
CYPRESS_CLIENT_GATEWAY_BASE_URL: 'https://safe-client.safe.global'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_DRAIN_SAFE_URL: ${{ env.SAFE_APPS_BASE_URL }}/drain-safe
CYPRESS_TX_BUILDER_URL: ${{ env.SAFE_APPS_BASE_URL }}/tx-builder
continue-on-error: false