8080 echo "Packages: $PACKAGES"
8181 echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
8282
83+ - name : Configure environment for Windows
84+ if : matrix.os == 'windows-latest'
85+ run : |
86+ # Install MSYS2
87+ choco install msys2 -y
88+ echo "C:\tools\msys64\usr\bin" >> $GITHUB_PATH
89+
90+ # Install "parallel" utility
91+ C:\tools\msys64\usr\bin\bash -lc "pacman -S --noconfirm parallel"
92+
8393 - name : Setup PHP
8494 uses : shivammathur/setup-php@v2
8595 with :
@@ -108,8 +118,7 @@ jobs:
108118 - name : Build root packages
109119 run : php .github/build-packages.php
110120
111- - name : Run packages tests (Unix)
112- if : matrix.os != 'windows-latest'
121+ - name : Run packages tests
113122 run : |
114123 source .github/workflows/.utils.sh
115124 echo "$PACKAGES" | xargs -n1 | parallel -j +3 "_run_task {} \
@@ -119,28 +128,6 @@ jobs:
119128 && if [ {} = LiveComponent ]; then install_property_info_for_version \"${{ matrix.php-version }}\" \"${{ matrix.minimum-stability }}\"; fi \
120129 && $PHPUNIT)'"
121130
122- - name : Run packages tests (Windows)
123- if : matrix.os == 'windows-latest'
124- run : |
125- source .github/workflows/.utils.sh
126-
127- # parallel is not available on Windows, so we need to run the tests sequentially
128- FAILED_PACKAGES=""
129- for PACKAGE in $PACKAGES; do
130- if ! PACKAGE="$PACKAGE" _run_task_sequential $PACKAGE \
131- '(cd src/$PACKAGE \
132- && $COMPOSER_MIN_STAB \
133- && $COMPOSER_UP \
134- && if [ "$PACKAGE" = "LiveComponent" ]; then install_property_info_for_version \"${{ matrix.php-version }}\" \"${{ matrix.minimum-stability }}\"; fi \
135- && $PHPUNIT)'; then
136- FAILED_PACKAGES="$FAILED_PACKAGES $PACKAGE"
137- fi
138- done
139-
140- if [ -n "$FAILED_PACKAGES" ]; then
141- echo "The following packages failed:$FAILED_PACKAGES"
142- exit 1
143- fi
144131 js :
145132 runs-on : ubuntu-latest
146133 strategy :
0 commit comments