Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2c7c4ba

Browse filesBrowse files
minor #58721 switch from AppVeyor to GitHub Actions to run tests on Windows (wouterj)
This PR was merged into the 5.4 branch. Discussion ---------- switch from AppVeyor to GitHub Actions to run tests on Windows | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT In #58370 I tried hard but failed to get our test suite running with PHPUnit 11 on AppVeyor. `@wouterj` did a great job reviving an old branch and got it working on GitHub Actions in #58699. I picked his commit and rebased it on the `5.4` branch so that we are able to have a consistent CI config throughout all maintained branches. Commits ------- 6f98b77 Port Appveyor to GitHub Actions
2 parents 67e9009 + 6f98b77 commit 2c7c4ba
Copy full SHA for 2c7c4ba

File tree

Expand file treeCollapse file tree

2 files changed

+128
-69
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+128
-69
lines changed

‎.appveyor.yml

Copy file name to clipboardExpand all lines: .appveyor.yml
-69Lines changed: 0 additions & 69 deletions
This file was deleted.

‎.github/workflows/windows.yml

Copy file name to clipboard
+128Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: Windows
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
windows:
16+
name: x86 / minimal-exts / lowest-php
17+
18+
defaults:
19+
run:
20+
shell: pwsh
21+
22+
runs-on: windows-2022
23+
24+
env:
25+
COMPOSER_NO_INTERACTION: '1'
26+
SYMFONY_DEPRECATIONS_HELPER: 'strict'
27+
ANSICON: '121x90 (121x90)'
28+
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: '1'
29+
30+
steps:
31+
- name: Setup Git
32+
run: |
33+
git config --global core.autocrlf false
34+
git config --global user.email ""
35+
git config --global user.name "Symfony"
36+
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 2
41+
42+
- name: Setup PHP
43+
run: |
44+
$env:Path = 'c:\php;' + $env:Path
45+
mkdir c:\php && cd c:\php
46+
iwr -outf php-7.2.5-Win32-VC15-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.2.5-Win32-VC15-x86.zip
47+
7z x php-7.2.5-Win32-VC15-x86.zip -y >nul
48+
cd ext
49+
iwr -outf php_apcu-5.1.19-7.2-ts-vc15-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-5.1.19-7.2-ts-vc15-x86.zip
50+
7z x php_apcu-5.1.19-7.2-ts-vc15-x86.zip -y >nul
51+
iwr -outf php_redis-5.3.2-7.2-ts-vc15-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_redis-5.3.2-7.2-ts-vc15-x86.zip
52+
7z x php_redis-5.3.2-7.2-ts-vc15-x86.zip -y >nul
53+
cd ..
54+
Copy php.ini-development php.ini-min
55+
"memory_limit=-1" >> php.ini-min
56+
"serialize_precision=-1" >> php.ini-min
57+
"max_execution_time=1200" >> php.ini-min
58+
"post_max_size=2047M" >> php.ini-min
59+
"upload_max_filesize=2047M" >> php.ini-min
60+
"date.timezone=`"America/Los_Angeles`"" >> php.ini-min
61+
"extension_dir=ext" >> php.ini-min
62+
"extension=php_xsl.dll" >> php.ini-min
63+
"extension=php_mbstring.dll" >> php.ini-min
64+
Copy php.ini-min php.ini-max
65+
"zend_extension=php_opcache.dll" >> php.ini-max
66+
"opcache.enable_cli=1" >> php.ini-max
67+
"extension=php_openssl.dll" >> php.ini-max
68+
"extension=php_apcu.dll" >> php.ini-max
69+
"extension=php_redis.dll" >> php.ini-max
70+
"apc.enable_cli=1" >> php.ini-max
71+
"extension=php_intl.dll" >> php.ini-max
72+
"extension=php_fileinfo.dll" >> php.ini-max
73+
"extension=php_pdo_sqlite.dll" >> php.ini-max
74+
"extension=php_curl.dll" >> php.ini-max
75+
"extension=php_sodium.dll" >> php.ini-max
76+
Copy php.ini-max php.ini
77+
cd ${{ github.workspace }}
78+
iwr -outf composer.phar https://getcomposer.org/download/latest-stable/composer.phar
79+
80+
- name: Install dependencies
81+
id: setup
82+
run: |
83+
$env:Path = 'c:\php;' + $env:Path
84+
mkdir $env:APPDATA\Composer && Copy .github\composer-config.json $env:APPDATA\Composer\config.json
85+
86+
$env:SYMFONY_VERSION=(Select-String -CaseSensitive -Pattern " VERSION =" -SimpleMatch -Path src/Symfony/Component/HttpKernel/Kernel.php | Select Line | Select-String -Pattern "([0-9][0-9]*\.[0-9])").Matches.Value
87+
$env:COMPOSER_ROOT_VERSION=$env:SYMFONY_VERSION + ".x-dev"
88+
89+
php .github/build-packages.php HEAD^ %SYMFONY_VERSION% src\Symfony\Bridge\PhpUnit
90+
php composer.phar update --no-progress --ansi
91+
92+
- name: Install PHPUnit
93+
run: |
94+
$env:Path = 'c:\php;' + $env:Path
95+
96+
php phpunit install
97+
98+
- name: Install memurai-developer
99+
run: |
100+
choco install --no-progress memurai-developer
101+
102+
- name: Run tests (minimal extensions)
103+
if: always() && steps.setup.outcome == 'success'
104+
run: |
105+
$env:Path = 'c:\php;' + $env:Path
106+
$env:SYMFONY_PHPUNIT_SKIPPED_TESTS = 'phpunit.skipped'
107+
$x = 0
108+
109+
Copy c:\php\php.ini-min c:\php\php.ini
110+
Remove-Item -Path src\Symfony\Bridge\PhpUnit -Recurse
111+
mv src\Symfony\Component\HttpClient\phpunit.xml.dist src\Symfony\Component\HttpClient\phpunit.xml
112+
php phpunit src\Symfony --exclude-group tty,benchmark,intl-data,network,transient-on-windows || ($x = 1)
113+
php phpunit src\Symfony\Component\HttpClient || ($x = 1)
114+
115+
exit $x
116+
117+
- name: Run tests
118+
if: always() && steps.setup.outcome == 'success'
119+
run: |
120+
$env:Path = 'c:\php;' + $env:Path
121+
$env:SYMFONY_PHPUNIT_SKIPPED_TESTS = 'phpunit.skipped'
122+
$x = 0
123+
124+
Copy c:\php\php.ini-max c:\php\php.ini
125+
php phpunit src\Symfony --exclude-group tty,benchmark,intl-data,network,transient-on-windows || ($x = 1)
126+
php phpunit src\Symfony\Component\HttpClient || ($x = 1)
127+
128+
exit $x

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.