Skip to content

add github action to execute the ui test on every PR submission and m… #1

add github action to execute the ui test on every PR submission and m…

add github action to execute the ui test on every PR submission and m… #1

name: PR and Merge Workflow
on:
pull_request:
branches:
- main
push:
branches:
- main
- auto-test
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
always-auth: true
node-version: 18
registry-url: https://npm.pkg.github.com
scope: '@secretkeylabs'
cache: npm
- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_REGISTRY_TOKEN }}
run: npm ci
- name: Test eslint
run: |
npx eslint .
npx tsc --noEmit
npm test
- name: Build
env:
TRANSAC_API_KEY: ${{ secrets.TRANSAC_API_KEY }}
MOON_PAY_API_KEY: ${{ secrets.MOON_PAY_API_KEY }}
MIX_PANEL_TOKEN: ${{ secrets.MIX_PANEL_TOKEN }}
run: npm run build
- name: Test UI
run: |
cd autotests
npm install
DEBUG=pw:api xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" npm test