Skip to content

Commit

Permalink
Matrix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrelan authored Jan 10, 2024
1 parent e078b19 commit 90c142e
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,37 @@ jobs:
run: |
cd drupal-contrib
bats tests
browser-tests:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
image: ['drupalci/chromedriver:production', 'selenium/standalone-chrome:111.0', 'selenium/standalone-firefox:111.0']

steps:
- name: Create project
run: |
composer create-project --ignore-platform-reqs mstrelan/drupal-contrib:dev-${{ github.ref_name }}
- name: Initialise environment
run: |
cd drupal-contrib
make 11.x
- name: Setup homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Setup bats
run: |
brew tap kaos/shell
brew install bats-support bats-assert bats-file
- name: Run tests
env:
SELENIUM_IMAGE: ${{ matrix.image }}
MINK_DRIVER_ARGS_WEBDRIVER: ${{ matrix.drupal_version == 'drupalci/chromedriver:production' && '["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--headless", "--disable-gpu", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://127.0.0.1:9515"]' || matrix.drupal_version == 'selenium/standalone-chrome:111.0' && '["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--headless", "--disable-gpu", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://127.0.0.1:4444/wd/hub"]' || matrix.drupal_version == 'selenium/standalone-firefox:111.0' && '["firefox", {"browserName":"firefox"}, "http://127.0.0.1:4444/wd/hub"]'}}
run: |
cd drupal-contrib
bats tests/phpunit.bats

0 comments on commit 90c142e

Please sign in to comment.