-
Notifications
You must be signed in to change notification settings - Fork 38
56 lines (45 loc) · 1.67 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build-php:
name: PHP ${{ matrix.php-versions }} with Composer ${{ matrix.composer-versions }}
runs-on: ubuntu-latest
strategy:
max-parallel: 6
fail-fast: false
matrix:
php-versions:
- "7.4"
- "8.0"
- "8.1"
composer-versions:
- "v2"
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup PHP version and composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:${{ matrix.composer-versions }}, php-cs-fixer
- name: Environment Check
run: |
php --version
composer --version
- name: Require Composer@v1
if: ${{ matrix.composer-versions == 'v1' }}
run: composer require "composer/composer:^1.10" --dev --no-update
- name: Require Composer@v2
if: ${{ matrix.composer-versions == 'v2' }}
run: composer require "composer/composer:^2.0" --dev --no-update
- name: Install composer dependencies
run: composer install
- name: Info
run: composer info
- name: Lint
run: composer test:php:lint
- name: CGL
if: ${{ matrix.php-versions != '8.1' }}
run: vendor/bin/php-cs-fixer fix --dry-run --verbose
- name: Unit Tests
run: composer test:php:unit