Skip to content

Commit a6282f5

Browse files
committed
workflows: added php-cgi
1 parent 864e03a commit a6282f5

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/tests.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,36 @@ name: Tests
22

33
on: [push, pull_request]
44

5+
env:
6+
php-options: -C -d opcache.enable=0
7+
php-extensions: fileinfo, intl
8+
59
jobs:
610
tests:
711
runs-on: ${{ matrix.os }}
812
strategy:
913
matrix:
1014
os: [ubuntu-latest, windows-latest, macOS-latest]
1115
php: ['7.2', '7.3', '7.4', '8.0']
12-
# sapi: ['php', 'php-cgi']
16+
sapi: ['php', 'php-cgi']
1317

1418
fail-fast: false
1519

16-
name: PHP ${{ matrix.php }} tests on ${{ matrix.os }}
20+
name: PHP ${{ matrix.php }}/${{ matrix.sapi }} tests on ${{ matrix.os }}
1721
steps:
1822
- uses: actions/checkout@v2
1923
- uses: shivammathur/setup-php@v2
2024
with:
2125
php-version: ${{ matrix.php }}
2226
coverage: none
23-
extensions: fileinfo, intl
27+
extensions: ${{ env.php-extensions }}
2428

2529
- run: composer install --no-progress --prefer-dist
26-
- run: vendor/bin/tester tests -s -C # -p ${{ matrix.sapi }}
30+
- run: vendor/bin/tester tests -p ${{ matrix.sapi }} -s ${{ env.php-options }}
2731
- if: failure()
2832
uses: actions/upload-artifact@v2
2933
with:
30-
name: output
34+
name: output ${{ matrix.php }}-${{ matrix.sapi }}-${{ matrix.os }}
3135
path: tests/**/output
3236

3337

@@ -40,10 +44,10 @@ jobs:
4044
with:
4145
php-version: 7.2
4246
coverage: none
43-
extensions: fileinfo, intl
47+
extensions: ${{ env.php-extensions }}
4448

4549
- run: composer update --no-progress --prefer-dist --prefer-lowest --prefer-stable
46-
- run: vendor/bin/tester tests -s -C
50+
- run: vendor/bin/tester tests -s ${{ env.php-options }}
4751

4852

4953
code_coverage:
@@ -55,10 +59,10 @@ jobs:
5559
with:
5660
php-version: 7.4
5761
coverage: none
58-
extensions: fileinfo, intl
62+
extensions: ${{ env.php-extensions }}
5963

6064
- run: composer install --no-progress --prefer-dist
61-
- run: vendor/bin/tester -p phpdbg tests -s -C --coverage ./coverage.xml --coverage-src ./src
65+
- run: vendor/bin/tester tests -p phpdbg -s ${{ env.php-options }} --coverage ./coverage.xml --coverage-src ./src
6266
- run: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar
6367
- env:
6468
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)