Skip to content

Commit

Permalink
Update phpt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dixyes committed Aug 6, 2024
1 parent 88a1d75 commit 62758f7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/run-php-src-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ $PSNativeCommandUseErrorActionPreference = $true

if ( "${env:GITHUB_WORKSPACE}" -Eq "" ) {
Write-Host "This script is intended to run in GitHub Actions environment only."
Write-Host "It's dangerous and meaningless in other environments."
exit 1
}

Expand Down Expand Up @@ -99,8 +100,12 @@ foreach ($excludeTest in $excludeTests) {
Remove-Item -Path $excludeTest -Recurse -Force -ErrorAction SilentlyContinue
}

# no pty for Windows
${env:SKIP_IO_CAPTURE_TESTS} = "true"

# test it
& php "run-tests.php" `
"-q" `
"-d" "extension=swow" `
"-d" "opcache.enable_cli=on" `
"--show-diff" `
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/run-php-src-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -xeo pipefail

if [[ -z "${GITHUB_WORKSPACE}" ]]; then
echo "This script is intended to run in GitHub Actions environment only."
echo "It's dangerous and meaningless in other environments."
exit 1
fi

Expand Down Expand Up @@ -99,6 +100,7 @@ rm -rf "${EXCLUDE_TESTS[@]}"

# test it
php run-tests.php \
-q \
-d extension="${GITHUB_WORKSPACE}/ext/.libs/swow.so" \
-d opcache.enable_cli=on \
--show-diff \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
id: test-php-src
continue-on-error: true
run: |
./.github/workflows/run-php-src-tests.sh
script -eqc ./.github/workflows/run-php-src-tests.sh
- name: Fail if test-extension failed
if: steps.test-extension.outcome != 'success'
Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:
id: test-php-src
continue-on-error: true
run: |
./.github/workflows/run-php-src-tests.sh
script -q whatever ./.github/workflows/run-php-src-tests.sh
- name: Fail if test-extension failed
if: steps.test-extension.outcome != 'success'
Expand Down

0 comments on commit 62758f7

Please sign in to comment.