Skip to content

Replace manual Fiber management with async gem primitives (#2111) #123

Replace manual Fiber management with async gem primitives (#2111)

Replace manual Fiber management with async gem primitives (#2111) #123

Workflow file for this run

name: Playwright E2E Tests
on:
push:
branches: [master]
# Always trigger on master; docs-only detection handles skipping heavy jobs
workflow_dispatch:
jobs:
detect-changes:
permissions:
contents: read
actions: read
runs-on: ubuntu-22.04
outputs:
docs_only: ${{ steps.detect.outputs.docs_only }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Detect relevant changes
id: detect
run: |
BASE_REF="${{ github.event.before || 'origin/master' }}"
script/ci-changes-detector "$BASE_REF"
shell: bash
- name: Guard docs-only master pushes
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: ./.github/actions/ensure-master-docs-safety
with:
docs-only: ${{ steps.detect.outputs.docs_only }}
previous-sha: ${{ github.event.before }}
playwright:
needs: detect-changes
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' || !(
github.event_name == 'push' &&
github.ref == 'refs/heads/master' &&
needs.detect-changes.outputs.docs_only == 'true'
)
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- uses: ./.github/actions/setup-node-with-retry
with:
node-version: '20'
cache: 'yarn'
- name: Install yalc globally
run: yarn global add 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
env:
RAILS_ENV: test
run: bundle exec rake react_on_rails:generate_packs
- name: Build test assets
working-directory: spec/dummy
run: yarn run build:test
- name: Run Playwright tests
working-directory: spec/dummy
run: yarn run test:e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: spec/dummy/e2e/playwright-report/
retention-days: 30