UI test automation #1
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: UI Automation Tests | |
on: pull_request | |
jobs: | |
playwright: | |
runs-on: ubuntu-latest | |
permissions: read-all | |
defaults: | |
run: | |
working-directory: "./wormhole-connect" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
cache-dependency-path: "wormhole-connect/package-lock.json" | |
- name: Install dependencies | |
run: npm ci | |
- name: Install headless Chromium for Playwright Browser | |
run: npx playwright install --with-deps --no-shell | |
- name: Start localhost | |
run: npm run start & | |
env: | |
REACT_APP_TEST_EVM_ADDR: ${{ secrets.REACT_APP_TEST_EVM_ADDR }} | |
REACT_APP_TEST_EVM_PK: ${{ secrets.REACT_APP_TEST_EVM_PK }} | |
- name: Run Playwright tests | |
run: npm test:e2e | |
env: | |
REACT_APP_TEST_EVM_ADDR: ${{ secrets.REACT_APP_TEST_EVM_ADDR }} | |
REACT_APP_TEST_EVM_PK: ${{ secrets.REACT_APP_TEST_EVM_PK }} | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: wormhole-connect/playwright-report/ | |
retention-days: 30 |