Merge pull request #3063 from cardano-foundation/fix/MET-1892-fix-too… #531
Workflow file for this run
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: Run E2E Tests on Development Environment | |
on: | |
push: | |
branches: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
pull_request: | |
branches: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⬇️ Checkout repository | |
uses: actions/checkout@v3 | |
- name: 🦾 Create .env file | |
run: | | |
echo "PORT=3000" > .env | |
echo "REACT_APP_VERSION=$npm_package_version" >> .env | |
echo "REACT_APP_API_URL=${{ secrets.DEV_EXPLORER_API_MAINNET_URL }}" >> .env | |
echo "REACT_APP_MAINNET_APP_URL=${{ secrets.DEV_EXPLORER_API_MAINNET_URL }}" >> .env | |
echo 'REACT_APP_NETWORK_NAMES="{"mainnet":"Mainnet","preprod":"Preprod"}"' >> .env | |
echo "REACT_APP_MAINNET_API_URL=${{ secrets.DEV_EXPLORER_API_MAINNET_URL }}" >> .env | |
echo "REACT_APP_AUTH_API_URL=${{ secrets.DEV_EXPLORER_AUTH_API_URL }}" >> .env | |
echo "REACT_APP_NETWORK=mainnet" >> .env | |
echo "REACT_APP_JSD_WIDGET_KEY=${{ secrets.EXPLORER_JSD_WIDGET_KEY }}" >> .env | |
echo "REACT_APP_BOLNISI_NAME_API=${{ secrets.REACT_APP_BOLNISI_NAME_API }}" >> .env | |
- name: 🫡 Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: 🧘♀️ Download dependencies | |
run: npm ci | |
- name: 🏂 Install serve globally | |
run: npm install -g serve | |
- name: 🚧 Build the project | |
run: npm run build | |
- name: 👻 Add empty env.global.js file | |
run: touch build/static/js/env.global.js | |
- name: 🎳 Run tests | |
uses: cypress-io/github-action@v6 | |
with: | |
start: serve -s build -L | |
wait-on: "http://localhost:3000" | |
wait-on-timeout: 360 | |
- name: 📹 Archive test videos | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: videos | |
path: ./cypress/videos | |
- name: 🖼️ Archive test screenshots | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: screenshots | |
path: ./cypress/screenshots |