forked from mtdowling/cron-expression
-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (52 loc) · 1.58 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
pull_request:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
tests:
name: Tests (PHP ${{ matrix.php }})
runs-on: ubuntu-20.04
strategy:
matrix:
php: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.3', '7.4', '8.0', '8.1' ]
with_coverage: [ false ]
include:
- php: '7.2'
with_coverage: true
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: "xdebug"
php-version: "${{ matrix.php }}"
tools: composer
# PHP 7.1 development web server segfaults if timezone not set.
ini-values: date.timezone=Europe/Paris, error_reporting=-1, display_errors=On
- name: Configure for PHP >= 7.1
if: "${{ matrix.php >= '7.1' }}"
run: |
composer require --no-update --dev symfony/error-handler "^4.4 || ^5.0"
- name: Install dependencies
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
- name: Run tests with Coverage
if: "${{ matrix.with_coverage == true }}"
run: |
vendor/bin/phpunit -v --coverage-text
- name: Run tests without Coverage
if: "${{ matrix.with_coverage == false }}"
run: |
vendor/bin/phpunit -v