-
-
Notifications
You must be signed in to change notification settings - Fork 183
57 lines (45 loc) · 1.48 KB
/
ci.yaml
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
name: "CI"
on:
pull_request:
push:
branches:
- '1.x'
- '2.x'
env:
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit"
jobs:
tests:
name: "PHP ${{ matrix.php }} ${{ matrix.mode }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: '8.0'
composer: 2.2.x
- php: '8.1'
mode: low-deps
steps:
- name: "Checkout code"
uses: actions/checkout@v2.3.3
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@2.18.0
with:
coverage: "none"
php-version: ${{ matrix.php }}
tools: composer:${{ matrix.composer }}
- name: "Validate composer.json"
run: "composer validate --strict --no-check-lock"
- name: "Install dependencies"
run: |
if [[ "${{ matrix.mode }}" = low-deps ]]; then
composer u --prefer-lowest --prefer-stable --ansi
else
composer u --ansi
fi
- name: "Install PHPUnit"
run: vendor/bin/simple-phpunit install
- run: vendor/bin/simple-phpunit
- if: matrix.php == '8.0'
name: "Lint PHP files"
run: find src/ -name '*.php' | xargs -n1 php -l