1
1
name : Unit Tests
2
2
3
+ defaults :
4
+ run :
5
+ shell : bash
6
+
3
7
on :
4
8
push :
5
9
paths-ignore :
@@ -18,14 +22,15 @@ concurrency:
18
22
19
23
jobs :
20
24
php :
21
- runs-on : ubuntu-latest
25
+ runs-on : ${{ matrix.os || ' ubuntu-latest' }}
22
26
strategy :
23
27
fail-fast : false
24
28
matrix :
25
29
php-version : ['8.1', '8.2', '8.3', '8.4']
26
30
dependency-version : ['']
27
31
symfony-version : ['']
28
32
minimum-stability : ['stable']
33
+ os : ['']
29
34
include :
30
35
# dev packages (probably not needed to have multiple such jobs)
31
36
- minimum-stability : ' dev'
36
41
# LTS version of Symfony
37
42
- php-version : ' 8.1'
38
43
symfony-version : ' 6.4.*'
44
+ - php-version : ' 8.1'
45
+ symfony-version : ' 6.4.*'
46
+ os : ' windows-latest'
39
47
40
48
env :
41
49
SYMFONY_REQUIRE : ${{ matrix.symfony-version || '>=5.4' }}
@@ -93,13 +101,24 @@ jobs:
93
101
run : |
94
102
source .github/workflows/.utils.sh
95
103
96
- echo "$PACKAGES" | xargs -n1 | parallel -j +3 "_run_task {} \
97
- '(cd src/{} \
98
- && $COMPOSER_MIN_STAB \
99
- && $COMPOSER_UP \
100
- && if [ {} = LiveComponent ]; then install_property_info_for_version \"${{ matrix.php-version }}\" \"${{ matrix.minimum-stability }}\"; fi \
101
- && $PHPUNIT)'"
102
-
104
+ if [ "${{ matrix.os }}" = "windows-latest" ]; then
105
+ # parallel is not available on Windows, so we need to run the tests sequentially
106
+ for PACKAGE in $PACKAGES; do
107
+ _run_task $PACKAGE \
108
+ '(cd src/$PACKAGE \
109
+ && $COMPOSER_MIN_STAB \
110
+ && $COMPOSER_UP \
111
+ && if [ $PACKAGE = LiveComponent ]; then install_property_info_for_version \"${{ matrix.php-version }}\" \"${{ matrix.minimum-stability }}\"; fi \
112
+ && $PHPUNIT)'
113
+ done
114
+ else
115
+ echo "$PACKAGES" | xargs -n1 | parallel -j +3 "_run_task {} \
116
+ '(cd src/{} \
117
+ && $COMPOSER_MIN_STAB \
118
+ && $COMPOSER_UP \
119
+ && if [ {} = LiveComponent ]; then install_property_info_for_version \"${{ matrix.php-version }}\" \"${{ matrix.minimum-stability }}\"; fi \
120
+ && $PHPUNIT)'"
121
+ fi
103
122
js :
104
123
runs-on : ubuntu-latest
105
124
strategy :
0 commit comments