11name : Unit Tests
22
3+ defaults :
4+ run :
5+ shell : bash
6+
37on :
48 push :
59 paths-ignore :
@@ -18,14 +22,15 @@ concurrency:
1822
1923jobs :
2024 php :
21- runs-on : ubuntu-latest
25+ runs-on : ${{ matrix.os || ' ubuntu-latest' }}
2226 strategy :
2327 fail-fast : false
2428 matrix :
2529 php-version : ['8.1', '8.2', '8.3', '8.4']
2630 dependency-version : ['']
2731 symfony-version : ['']
2832 minimum-stability : ['stable']
33+ os : ['']
2934 include :
3035 # dev packages (probably not needed to have multiple such jobs)
3136 - minimum-stability : ' dev'
3641 # LTS version of Symfony
3742 - php-version : ' 8.1'
3843 symfony-version : ' 6.4.*'
44+ - php-version : ' 8.1'
45+ symfony-version : ' 6.4.*'
46+ os : ' windows-latest'
3947
4048 env :
4149 SYMFONY_REQUIRE : ${{ matrix.symfony-version || '>=5.4' }}
@@ -93,13 +101,29 @@ jobs:
93101 run : |
94102 source .github/workflows/.utils.sh
95103
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+ _run_task "test" 'echo "foo"'
106+ echo "PACKAGES: $PACKAGES"
107+ for PACKAGE in $PACKAGES; do
108+ echo "PACKAGE: $PACKAGE"
109+ done
110+ # parallel is not available on Windows, so we need to run the tests sequentially
111+ for PACKAGE in $PACKAGES; do
112+ _run_task $PACKAGE \
113+ '(cd src/$PACKAGE \
114+ && $COMPOSER_MIN_STAB \
115+ && $COMPOSER_UP \
116+ && if [ $PACKAGE = LiveComponent ]; then install_property_info_for_version \"${{ matrix.php-version }}\" \"${{ matrix.minimum-stability }}\"; fi \
117+ && $PHPUNIT)'
118+ done
119+ else
120+ echo "$PACKAGES" | xargs -n1 | parallel -j +3 "_run_task {} \
121+ '(cd src/{} \
122+ && $COMPOSER_MIN_STAB \
123+ && $COMPOSER_UP \
124+ && if [ {} = LiveComponent ]; then install_property_info_for_version \"${{ matrix.php-version }}\" \"${{ matrix.minimum-stability }}\"; fi \
125+ && $PHPUNIT)'"
126+ fi
103127 js :
104128 runs-on : ubuntu-latest
105129 strategy :
0 commit comments