-
-
Notifications
You must be signed in to change notification settings - Fork 38
107 lines (92 loc) · 3.34 KB
/
Copy pathintegrationtest.yml
File metadata and controls
107 lines (92 loc) · 3.34 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
name: Integration Test
on:
# Run on pushes to `main` and on all pull requests.
push:
branches:
- main
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
- '8.5'
- '8.6'
composer:
- 'v2'
- '2.2'
os:
- 'ubuntu-latest'
- 'windows-latest'
exclude:
# Composer 2.3 drops support for PHP < 7.2, so `v2` will install Composer >= 2.3.
# The current matrix is set up to safeguard that the Composer 2.2 LTS version is 100% supported for PHP 7.2-8.3.
# Note: Composer 2.2 is not compatible with PHP >= 8.4 and it is unlikely that it will be
# made compatible with PHP >= 8.4, so we need to exclude those builds.
- php: '8.4'
composer: '2.2'
- php: '8.5'
composer: '2.2'
- php: '8.6'
composer: '2.2'
include:
# Also test against the dev version of Composer for early warning about upcoming changes.
- php: 'latest'
composer: 'snapshot'
os: 'ubuntu-latest'
- php: 'latest'
composer: 'snapshot'
os: 'windows-latest'
name: "Integration test"
continue-on-error: ${{ matrix.php == '8.6' || matrix.composer == 'snapshot' }}
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php }}
extensions: json, zip
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On, display_startup_errors=On
tools: "composer:${{ matrix.composer }}"
coverage: none
env:
fail-fast: true
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
- name: Install Composer dependencies
if: ${{ matrix.php != '8.6' }}
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
with:
composer-options: '--optimize-autoloader'
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")
- name: Install Composer dependencies
if: ${{ matrix.php == '8.6' }}
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
with:
composer-options: '--ignore-platform-reqs --optimize-autoloader'
custom-cache-suffix: $(date -u "+%Y-%m")
- name: Run integration tests
run: vendor/bin/phpunit --no-coverage