-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (37 loc) · 1.15 KB
/
phpunit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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' }}