-
Notifications
You must be signed in to change notification settings - Fork 355
80 lines (66 loc) · 2.09 KB
/
continuous-integration.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: "Continuous Integration"
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
jobs:
tests:
name: "CI"
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
dependencies: [highest]
experimental: [false]
include:
- php-version: "7.2"
dependencies: highest
experimental: false
- php-version: "7.2"
dependencies: lowest
experimental: false
# - php-version: "8.0"
# dependencies: highest
# experimental: false
# - php-version: "8.1"
# dependencies: lowest-ignore
# experimental: true
# - php-version: "8.1"
# dependencies: highest-ignore
# experimental: true
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "intl, zip"
ini-values: "memory_limit=-1, phar.readonly=0, error_reporting=E_ALL, display_errors=On"
php-version: "${{ matrix.php-version }}"
tools: composer
- name: "Handle lowest dependencies update"
if: "contains(matrix.dependencies, 'lowest')"
run: "echo \"COMPOSER_UPDATE_FLAGS=$COMPOSER_UPDATE_FLAGS --prefer-lowest\" >> $GITHUB_ENV"
- name: "Handle ignore-platform-reqs dependencies update"
if: "contains(matrix.dependencies, 'ignore')"
run: "echo \"COMPOSER_FLAGS=$COMPOSER_FLAGS --ignore-platform-req=php\" >> $GITHUB_ENV"
- name: "Update dependencies"
run: "composer update ${{ env.COMPOSER_UPDATE_FLAGS }} ${{ env.COMPOSER_FLAGS }}"
- name: "Validate composer.json"
run: "composer validate"
- name: "Run tests"
run: "composer test"