Skip to content

Commit 9c08d0b

Browse files
authored
Merge pull request php-curl-class#693 from zachborboa/master
Add PHP 8.1 and PHP 8.2 to continuous integration tests
2 parents 8626b78 + 21564e7 commit 9c08d0b

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@ jobs:
2121
- '7.3'
2222
- '7.4'
2323
- '8.0'
24+
future-release: [false]
25+
include:
26+
- php: '8.1'
27+
future-release: true
28+
- php: '8.2'
29+
future-release: true
2430
fail-fast: false
2531
name: PHP ${{ matrix.php }}
32+
continue-on-error: ${{ matrix.future-release }}
2633

2734
steps:
2835
- name: Set up php
@@ -37,3 +44,4 @@ jobs:
3744
run: bash tests/ci.sh
3845
env:
3946
CI_PHP_VERSION: ${{ matrix.php }}
47+
CI_PHP_FUTURE_RELEASE: ${{ matrix.future-release }}

tests/ci.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4444
cd "${SCRIPT_DIR}"
4545

4646
echo "CI_PHP_VERSION: ${CI_PHP_VERSION}"
47+
echo "CI_PHP_FUTURE_RELEASE: ${CI_PHP_FUTURE_RELEASE}"
4748
php -r "var_dump(phpversion());"
4849
php -r "var_dump(curl_version());"
4950

@@ -120,4 +121,8 @@ for pid in "${pids[@]}"; do
120121
kill "${pid}" &> /dev/null &
121122
done
122123

123-
exit "${#errors[@]}"
124+
if [[ "${CI_PHP_FUTURE_RELEASE}" != "true" ]]; then
125+
exit "${#errors[@]}"
126+
elif [[ "${#errors[@]}" -ne 0 ]]; then
127+
echo "One or more tests failed, but allowed as CI_PHP_FUTURE_RELEASE is on for PHP version ${CI_PHP_VERSION}."
128+
fi

tests/run.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4141
cd "${SCRIPT_DIR}"
4242

4343
echo "CI_PHP_VERSION: ${CI_PHP_VERSION}"
44+
echo "CI_PHP_FUTURE_RELEASE: ${CI_PHP_FUTURE_RELEASE}"
4445
php -r "var_dump(phpversion());"
4546
php -r "var_dump(curl_version());"
4647

@@ -119,4 +120,8 @@ for pid in "${pids[@]}"; do
119120
kill "${pid}" &> /dev/null &
120121
done
121122

122-
exit "${#errors[@]}"
123+
if [[ "${CI_PHP_FUTURE_RELEASE}" != "true" ]]; then
124+
exit "${#errors[@]}"
125+
elif [[ "${#errors[@]}" -ne 0 ]]; then
126+
echo "One or more tests failed, but allowed as CI_PHP_FUTURE_RELEASE is on for PHP version ${CI_PHP_VERSION}."
127+
fi

0 commit comments

Comments
 (0)