(feat) Improved UI of play Typing Speed Test #96
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: Playwright e2e Tests | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request_target: | ||
types: [labeled, opened, synchronize, reopened] | ||
concurrency: | ||
group: environment-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
playwright-run: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'reactplay/react-play' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Packages | ||
run: | | ||
npm install --legacy-peer-deps | ||
# Install NPM dependencies, cache them correctly | ||
# and run all Playwright tests | ||
- name: Playwright run | ||
uses: actions/checkout@v4 | ||
with: | ||
install-command: | | ||
npm install --legacy-peer-deps | ||
start: npm start | ||
wait-on: "http://localhost:3000" | ||
browser: chrome | ||
env: | ||
# pass GitHub token to detect new build vs re-run build | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: yarn e2e | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |