Skip to content

Commit 0f29271

Browse files
wouterjxabbuh
authored andcommitted
Port Appveyor to GitHub Actions
1 parent ceef101 commit 0f29271

File tree

2 files changed

+128
-69
lines changed

2 files changed

+128
-69
lines changed

.appveyor.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/windows.yml

Lines 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: Windows
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy