Skip to content

Add Playwright E2E testing framework #7

Add Playwright E2E testing framework

Add Playwright E2E testing framework #7

Workflow file for this run

name: Playwright E2E Tests
on:
pull_request:
push:
branches: [master]
jobs:
playwright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Install yalc globally
run: npm install -g yalc
- name: Install root dependencies
run: yarn install
- name: Install dummy app dependencies
working-directory: spec/dummy
run: |
bundle install
yarn install
- name: Install Playwright browsers
working-directory: spec/dummy
run: yarn playwright install --with-deps
- name: Generate React on Rails packs
working-directory: spec/dummy
run: RAILS_ENV=test bundle exec rake react_on_rails:generate_packs
- name: Build test assets
working-directory: spec/dummy
run: yarn build:test
- name: Run Playwright tests
working-directory: spec/dummy
run: yarn test:e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: spec/dummy/e2e/playwright-report/
retention-days: 30