Skip to content

Tests

Tests #133

Workflow file for this run

name: Tests
on:
schedule:
- cron: "0 0 * * *"
push:
branches: [ main, develop, feature/** ]
pull_request:
branches: [ main, develop, feature/** ]
permissions:
contents: read
jobs:
unit:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php-versions: [ '8.5' ]
name: Unit - PHP ${{ matrix.php-versions }} - ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: curl, dom, json, mbstring, xml, zip
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction --no-scripts
env:
CHROME_PATH: ${{ steps.chrome.outputs.chrome-path }}
- name: Run unit tests
timeout-minutes: 5
run: vendor/bin/phpunit --testdox --no-coverage --exclude-group=integration
env:
CHROME_PATH: ${{ steps.chrome.outputs.chrome-path }}
integration:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php-versions: [ '8.5' ]
name: Integration - PHP ${{ matrix.php-versions }} - ${{ matrix.os }}
env:
PANTHER_NO_SANDBOX: true
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: curl, dom, json, mbstring, xml, zip
- name: Setup Chrome
id: chrome
uses: browser-actions/setup-chrome@v2
with:
chrome-version: stable
- name: Set CHROME_PATH
shell: bash
run: echo "CHROME_PATH=${{ steps.chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction --no-scripts
- name: Install ChromeDriver
run: composer run driver:install
- name: Run integration tests
timeout-minutes: 5
run: vendor/bin/phpunit --testdox --no-coverage --group=integration