Skip to content

Add e2e tests

Add e2e tests #64

Workflow file for this run

name: PHPUnit Tests
on:
workflow_dispatch:
inputs:
TEST_SUITE:
description: 'pick PHPUnit test suite'
type: choice
options:
- default
- unit
- e2e
required: false
default: 'default'
push:
pull_request:
branches:
- trunk
jobs:
test:
name: PHP ${{ matrix.php }}
uses: ./.github/workflows/phpunit-tests-run.yml
permissions:
contents: read
secrets: inherit
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
phpunit-config: 'phpunit.xml.dist'
# for a manual workflow dispatch -> will use the TEST_SUITE value
# for all pushes to any branch -> will only run unit tests
# for pull requests to the trunk -> will run unit and e2e tests
phpunit-testsuite: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.TEST_SUITE != '') && github.event.inputs.TEST_SUITE || (github.event_name == 'push' && 'unit') || 'default' }}