43 lines (33 loc) · 1.13 KB
/
run-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
name: The PHP League Tests
on: [push, pull_request]
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4]
name: League - PHP ${{ matrix.php }} on ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: phpcs, phpunit
- name: Validate Composer
run: composer validate
- name: Cache Dependencies
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ matrix.os }}-composer-cache-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ matrix.os }}-php-${{ matrix.php }}
- name: Install Dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Execute Tests
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover