Skip to content

Commit f7573f6

Browse files
authored
Merge pull request #52 from WyriHaximus-labs/detect-support-php-versions-in-range-during-ci-instead-of-hardcoding-them
Detect supported PHP versions in range during CI instead of hardcoding them
2 parents 130c9d4 + c804b87 commit f7573f6

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,23 @@ on:
55
pull_request:
66

77
jobs:
8+
supported-versions-matrix:
9+
name: Supported Versions Matrix
10+
runs-on: ubuntu-latest
11+
outputs:
12+
version: ${{ steps.supported-versions-matrix.outputs.version }}
13+
steps:
14+
- uses: actions/checkout@v3
15+
- id: supported-versions-matrix
16+
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
817
latest:
918
name: PHP ${{ matrix.php }} Latest
1019
runs-on: ubuntu-latest
20+
needs:
21+
- supported-versions-matrix
1122
strategy:
1223
matrix:
13-
php: ['7.1', '7.2', '7.3', '7.4', '8.0']
24+
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
1425

1526
steps:
1627
- name: Checkout code
@@ -35,9 +46,11 @@ jobs:
3546
lowest:
3647
name: PHP ${{ matrix.php }} Lowest
3748
runs-on: ubuntu-latest
49+
needs:
50+
- supported-versions-matrix
3851
strategy:
3952
matrix:
40-
php: ['7.1', '7.2', '7.3', '7.4']
53+
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
4154

4255
steps:
4356
- name: Checkout code

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
## [Unreleased]
1010

11+
- Detect supported PHP versions in range during CI instead of hardcoding them
12+
1113
### Changed
1214

1315
## [3.0.1] - 2021-10-20

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"php-http/httplug": "^2.0",
1616
"react/http": "^1.0",
1717
"react/event-loop": "^1.2",
18-
"php-http/discovery": "^1.0"
18+
"php-http/discovery": "^1.0",
19+
"phpunit/phpunit": "^9.3.11 || ^7"
1920
},
2021
"require-dev": {
2122
"php-http/client-integration-tests": "^3.0",

0 commit comments

Comments
 (0)