Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# RoleModel/actions

## [v3.3.0] Mar 11, 2026

- Add optional `web-driver` input to `system-tests` action.
- default value is `selenium`
- `playwright` is also supported

## [v3.2.0] Mar 5, 2026

- Add new `staging-auto-merge` action, migrated from https://github.com/RoleModel/staging-auto-merge.
Expand Down Expand Up @@ -45,6 +51,7 @@ New Composite Actions:
- Add `test-cleanup` action to save logs
- Add `test-runtime-analyzer` action to post test runtimes

[v3.3.0]: https://github.com/RoleModel/actions/releases/tag/v3.3.0
[v3.2.0]: https://github.com/RoleModel/actions/releases/tag/v3.2.0
[v3.1.0]: https://github.com/RoleModel/actions/releases/tag/v3.1.0
[v3.0.0]: https://github.com/RoleModel/actions/releases/tag/v3.0.0
Expand Down
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,27 @@ jobs:

This is a combination of multiple composite actions that can be used to run your entire CI flow for a rails app using parallel_tests. Each action allow you to customize the machine, environment variables, and any custom install steps that are needed. It does require you to check out the code yourself, since some install steps might happen after that.

The only inputs are for the linting and non system test action. Neither are required:

- `linting-step-required`: Boolean (default is false). Only needed if you have a linting command
- `linting-step-command`: String, `bundle exec rubocop --fail-level warning --display-only-fail-level-offenses --format github`

Here's what your `ci.yml` file could look like
### Inputs, by composit action name

- `non-system-test`:
- `linting-step-required`
- Whether linting is required
- Optional, default is `false`
- `linting-step-command`
- Command for linting (e.g., "bundle exec rubocop")
- Optional, default is `''`
- `needs-compiled-assets`
- Whether to retrieve the Rails asset cache (set to false if your workflow does not depend on the compile-assets workflow)
- Optional, default is `true`
- `system-tests`:
- `web-driver`
- Supported values are 'selenium' and 'playwright'
- Optional, default is `selenium`
- `failure-screenshot-dir`
- the directory where your test runner saves screenshots on failure
- Optional, default is `tmp/capybara`

### Example ci.yml workflow

```yaml
name: CI
Expand Down Expand Up @@ -173,10 +188,9 @@ jobs:
sudo apt-get install -y libvips

- uses: RoleModel/actions/system-tests@v3
# if you've configured capybara to be compatible with the tmp:clear task
# you can tell the system-tests action like this:
with:
failure-screenshot-dir: tmp/screenshots
failure-screenshot-dir: tmp/screenshots # if you've configured capybara to be compatible with the tmp:clear task
web-driver: playwright # remove this input to use the default value (selenium)
# completely optional job (for Rails projects only) - outputs a stats table in your workflow's summary page
project-stats:
name: Project Stats
Expand Down
29 changes: 24 additions & 5 deletions system-tests/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Ruby System Tests
description: Runs Ruby system tests
inputs:
web-driver:
description: Supported values are 'selenium' and 'playwright'
required: false
default: selenium

failure-screenshot-dir:
description: the directory where your test runner saves screenshots on failure
required: false
Expand All @@ -9,10 +14,6 @@ inputs:
runs:
using: composite
steps:
- name: Setup Chrome
uses: browser-actions/setup-chrome@v2
id: setup-chrome

- name: Enable Corepack
shell: bash
run: corepack enable
Expand All @@ -27,6 +28,24 @@ runs:
shell: bash
run: yarn install --immutable

- name: Check Playwright Cache
if: inputs.web-driver == 'playwright'
uses: actions/cache@v5
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Setup Playwright
if: inputs.web-driver == 'playwright' && steps.playwright-cache.outputs.cache-hit != 'true'
shell: bash
run: yarn playwright install chromium

- name: Setup Chrome
if: inputs.web-driver == 'selenium'
uses: browser-actions/setup-chrome@v2
id: setup-chrome

- name: Install Ruby and Gems
uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -58,7 +77,7 @@ runs:
shell: bash
run: bundle exec parallel_rspec --verbose-command spec/system
env:
GOOGLE_CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
GOOGLE_CHROME_BIN: ${{ case(inputs.web-driver == 'selenium', steps.setup-chrome.outputs.chrome-path, '') }}
CAPYBARA_DRIVER: js

- name: Publish Test Results
Expand Down