Update CI test environments #166
Workflow file for this run
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: RSpec | |
on: [pull_request] | |
jobs: | |
example_spec_legacy: | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby_version: | |
- 2.4.10 | |
- 2.5.9 | |
- 2.6.10 | |
- 2.7.8 | |
name: (${{ matrix.ruby_version }}) Example | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby_version }} | |
bundler-cache: true | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- uses: microsoft/playwright-github-action@v1 | |
- name: setup playwright via npm install | |
run: | | |
export PLAYWRIGHT_CLI_VERSION=$(bundle exec ruby -e 'require "playwright"; puts Playwright::COMPATIBLE_PLAYWRIGHT_VERSION.strip') | |
npm install playwright@${PLAYWRIGHT_CLI_VERSION} || npm install playwright@next | |
./node_modules/.bin/playwright install | |
- run: bundle exec rspec spec/feature/ | |
env: | |
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright | |
timeout-minutes: 3 | |
example_spec: | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby_version: | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
- "3.3" | |
name: (${{ matrix.ruby_version }}) Example | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby_version }} | |
bundler-cache: true | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- uses: microsoft/playwright-github-action@v1 | |
- name: setup playwright via npm install | |
run: | | |
export PLAYWRIGHT_CLI_VERSION=$(bundle exec ruby -e 'require "playwright"; puts Playwright::COMPATIBLE_PLAYWRIGHT_VERSION.strip') | |
npm install playwright@${PLAYWRIGHT_CLI_VERSION} || npm install playwright@next | |
./node_modules/.bin/playwright install | |
- run: bundle exec rspec spec/feature/ | |
env: | |
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright | |
timeout-minutes: 3 | |
playwright_driver_spec: | |
needs: example_spec | |
strategy: | |
fail-fast: false | |
matrix: | |
browser: [chromium, webkit] | |
name: (${{ matrix.browser }}) Playwright Driver | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
bundler-cache: true | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- uses: microsoft/playwright-github-action@v1 | |
- name: setup playwright via npm install | |
run: | | |
export PLAYWRIGHT_CLI_VERSION=$(bundle exec ruby -e 'require "playwright"; puts Playwright::COMPATIBLE_PLAYWRIGHT_VERSION.strip') | |
npm install playwright@${PLAYWRIGHT_CLI_VERSION} || npm install playwright@next | |
./node_modules/.bin/playwright install | |
- run: bundle exec rspec spec/capybara/ | |
env: | |
BROWSER: ${{ matrix.browser }} | |
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright | |
timeout-minutes: 25 | |
playwright_driver_spec_firefox: | |
needs: example_spec | |
name: (firefox) Playwright Driver | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: setup Allure | |
run: | | |
wget https://github.com/allure-framework/allure2/releases/download/2.14.0/allure_2.14.0-1_all.deb | |
sudo dpkg -i allure_2.14.0-1_all.deb | |
rm allure_2.14.0-1_all.deb | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
bundler-cache: true | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- uses: microsoft/playwright-github-action@v1 | |
- name: setup playwright via npm install | |
run: | | |
export PLAYWRIGHT_CLI_VERSION=$(bundle exec ruby -e 'require "playwright"; puts Playwright::COMPATIBLE_PLAYWRIGHT_VERSION.strip') | |
npm install playwright@${PLAYWRIGHT_CLI_VERSION} || npm install playwright@next | |
./node_modules/.bin/playwright install | |
- run: bundle exec rspec spec/capybara/ --format AllureRspecFormatter --format documentation --failure-exit-code 0 | |
env: | |
BROWSER: firefox | |
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright | |
timeout-minutes: 45 | |
- run: bundle exec rspec spec/capybara/ --format AllureRspecFormatter --format documentation --only-failures | |
env: | |
BROWSER: firefox | |
DEBUG: 1 | |
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright | |
timeout-minutes: 15 | |
- run: allure generate reports/allure-results | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: allure-report | |
path: allure-report |