1313 description : The PHP version the workflow should run
1414 type : string
1515 required : true
16+ os :
17+ description : The GitHub-hosted runner for the job
18+ type : string
19+ required : true
1620 job-id :
1721 description : Job ID to be used as part of cache key and artifact name
1822 type : string
4953jobs :
5054 tests :
5155 name : ${{ inputs.job-name }}
52- runs-on : ubuntu-22.04
56+ runs-on : ${{ inputs.os }}
5357
5458 steps :
59+ - name : Set Git to use LF
60+ if : ${{ contains(inputs.os, 'windows') }}
61+ run : |
62+ git config --global core.autocrlf false
63+ git config --global core.eol lf
64+
5565 - name : Install latest ImageMagick
5666 if : ${{ contains(inputs.extra-extensions, 'imagick') }}
5767 run : |
@@ -68,22 +78,24 @@ jobs:
6878 with :
6979 php-version : ${{ inputs.php-version }}
7080 tools : composer
71- extensions : gd, ${{ inputs.extra-extensions }}
81+ extensions : intl, gd, ${{ inputs.extra-extensions }}
7282 coverage : ${{ env.COVERAGE_DRIVER }}
7383 env :
7484 COVERAGE_DRIVER : ${{ inputs.enable-coverage && 'xdebug' || 'none' }}
7585
7686 - name : Setup global environment variables
7787 run : |
7888 echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
79- echo "ARTIFACT_NAME=${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}" >> $GITHUB_ENV
89+ echo "ARTIFACT_NAME=${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-os-${{ inputs.os }}" >> $GITHUB_ENV
90+ shell : bash
8091
8192 - name : Cache Composer dependencies
8293 uses : actions/cache@v3
8394 with :
8495 path : ${{ env.COMPOSER_CACHE_FILES_DIR }}
85- key : ${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-${{ hashFiles('**/composer.*') }}
96+ key : ${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-os-${{ inputs.os }}- ${{ hashFiles('**/composer.*') }}
8697 restore-keys : |
98+ ${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-os-${{ inputs.os }}-
8799 ${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-
88100 ${{ inputs.job-id || github.job }}-
89101
@@ -109,7 +121,7 @@ jobs:
109121 GROUP_OPTION : ${{ inputs.group-name && format('--group {0}', inputs.group-name) || '' }}
110122
111123 - name : Run tests
112- run : script -e -c " vendor/bin/phpunit --color=always ${{ env.EXTRA_PHPUNIT_OPTIONS }}"
124+ run : vendor/bin/phpunit --color=always ${{ env.EXTRA_PHPUNIT_OPTIONS }}
113125 env :
114126 TACHYCARDIA_MONITOR_GA : ${{ inputs.enable-profiling && 'enabled' || '' }}
115127 TERM : xterm-256color
0 commit comments