|
80 | 80 | echo "Packages: $PACKAGES"
|
81 | 81 | echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
|
82 | 82 |
|
| 83 | + - name: Configure environment for Windows |
| 84 | + if: matrix.os == 'windows-latest' |
| 85 | + run: | |
| 86 | + # Install MSYS2 |
| 87 | + choco install msys2 -y --no-progress |
| 88 | +
|
| 89 | + # Install "parallel" utility |
| 90 | + C:\\tools\\msys64\\usr\\bin\\bash -lc "pacman -S --noconfirm parallel" |
| 91 | +
|
83 | 92 | - name: Setup PHP
|
84 | 93 | uses: shivammathur/setup-php@v2
|
85 | 94 | with:
|
@@ -108,39 +117,16 @@ jobs:
|
108 | 117 | - name: Build root packages
|
109 | 118 | run: php .github/build-packages.php
|
110 | 119 |
|
111 |
| - - name: Run packages tests (Unix) |
112 |
| - if: matrix.os != 'windows-latest' |
| 120 | + - name: Run packages tests |
113 | 121 | run: |
|
114 | 122 | source .github/workflows/.utils.sh
|
115 |
| - echo "$PACKAGES" | xargs -n1 | parallel -j +3 "_run_task {} \ |
| 123 | + echo "$PACKAGES" | xargs -n1 | ${{ matrix.os == 'windows-latest' && 'C:\\tools\\msys64\\usr\\bin\\parallel' || 'parallel' }} -j +3 "_run_task {} \ |
116 | 124 | '(cd src/{} \
|
117 | 125 | && $COMPOSER_MIN_STAB \
|
118 | 126 | && $COMPOSER_UP \
|
119 | 127 | && if [ {} = LiveComponent ]; then install_property_info_for_version \"${{ matrix.php-version }}\" \"${{ matrix.minimum-stability }}\"; fi \
|
120 | 128 | && $PHPUNIT)'"
|
121 | 129 |
|
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 |
144 | 130 | js:
|
145 | 131 | runs-on: ubuntu-latest
|
146 | 132 | strategy:
|
|
0 commit comments