-
Notifications
You must be signed in to change notification settings - Fork 36
78 lines (64 loc) · 2.27 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Bundle CI
on:
push:
branches: ['main']
pull_request:
schedule:
- cron: '0 */12 * * *'
jobs:
static-analysis:
name: Static Analysis
runs-on: ubuntu-18.04
steps:
- name: "Checkout code"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.0"
- name: "Validate composer.json"
run: "composer validate --strict --no-check-lock"
- name: "Composer install"
uses: "ramsey/composer-install@v1"
with:
composer-options: "--prefer-stable"
dependency-versions: 'highest'
- name: Install PHP-CS-Fixer
run: composer global require friendsofphp/php-cs-fixer --prefer-dist --no-progress
- name: Running php-cs-fixer
run: $HOME/.composer/vendor/bin/php-cs-fixer fix --config $GITHUB_WORKSPACE/.php-cs-fixer.dist.php --diff --dry-run
tests:
name: "Tests ${{ matrix.php-version }} ${{ matrix.dependency-versions }} deps ${{ matrix.dependency-versions }}"
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
# normal, highest, non-dev installs
php-version: ['8.0', '8.1']
composer-options: ['--prefer-stable']
dependency-versions: ['highest']
include:
# testing lowest PHP version with lowest dependencies
- php-version: '8.0'
dependency-versions: 'lowest'
composer-options: '--prefer-lowest'
steps:
- name: "Checkout code"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: Install Global Dependencies
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex >=1.x
- name: "Composer install"
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"
- name: All Tests
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist