-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from woocommerce/24-03/windows-ssl
Windows SSL
- Loading branch information
Showing
4 changed files
with
213 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: QIT Windows | ||
|
||
on: | ||
push: | ||
branches: | ||
- trunk | ||
# Manually | ||
workflow_dispatch: | ||
|
||
jobs: | ||
qit_windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
php: [ 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3 ] | ||
env: | ||
NO_COLOR: 1 | ||
QIT_DISABLE_ONBOARDING: yes | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: curl, zip | ||
coverage: none | ||
|
||
- name: Composer install | ||
working-directory: src | ||
run: composer install | ||
|
||
- name: Enable dev mode | ||
working-directory: src | ||
run: php qit-cli.php dev | ||
|
||
- name: Run SSL connection without CA file fallback Test | ||
working-directory: src | ||
env: | ||
OPENSSL_CONF: '' | ||
run: | | ||
php -d openssl.cafile='' -d curl.cainfo='' qit-cli.php sync -vvv | ||
if ($LASTEXITCODE -ne 0) { | ||
Write-Host "Test passed: SSL connection failed as expected" | ||
$LASTEXITCODE = 0 | ||
} else { | ||
Write-Host "Test failed: SSL connection did not fail as expected" | ||
exit 1 | ||
} | ||
- name: Run SSL connection with CA file fallback Test (Cache miss) | ||
working-directory: src | ||
env: | ||
QIT_WINDOWS_DOWNLOAD_CA: yes | ||
OPENSSL_CONF: '' | ||
run: | | ||
php -d openssl.cafile='' -d curl.cainfo='' qit-cli.php sync -vvv | ||
if ($LASTEXITCODE -eq 0) { | ||
Write-Host "Test passed: SSL connection succeeded" | ||
} else { | ||
Write-Host "Test failed: SSL connection did not succeed" | ||
exit 1 | ||
} | ||
- name: Run SSL connection with CA file fallback Test (Cache hit) | ||
working-directory: src | ||
env: | ||
QIT_WINDOWS_DOWNLOAD_CA: yes | ||
OPENSSL_CONF: '' | ||
run: | | ||
php -d openssl.cafile='' -d curl.cainfo='' qit-cli.php sync -vvv | ||
if ($LASTEXITCODE -eq 0) { | ||
Write-Host "Test passed: SSL connection succeeded" | ||
} else { | ||
Write-Host "Test failed: SSL connection did not succeed" | ||
exit 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters