11name : Tests
22on : [pull_request, push]
33
4- env :
5- COMPOSER_TOKEN : false
6-
74jobs :
85 unit-tests :
96 runs-on : ubuntu-latest
129 php-version : ["7.4", "8.0"]
1310
1411 env :
15- EXECUTE_COVERAGE : ${{ matrix.php == '7.4' }}
12+ EXECUTE_COVERAGE : ${{ matrix.php-version == '7.4' }}
1613 MEASURE_COVERAGE : false
1714 CLOVER_PATH : " .clover.xml"
1815
2118
2219 - name : Setup PHP
2320 uses : shivammathur/setup-php@v2
21+ env :
22+ COMPOSER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2423 with :
2524 php-version : ${{ matrix.php-version }}
2625 extensions : mbstring, intl, curl, json
@@ -42,12 +41,12 @@ jobs:
4241 restore-keys : |
4342 ${{ runner.os }}-composer-
4443
45- - name : Login composer
46- if : env.COMPOSER_TOKEN != 'false'
47- run : composer config -g github-oauth.github.com ${{ secrets.COMPOSER_TOKEN }}
44+ # - name: Login composer
45+ # if: env.COMPOSER_TOKEN != 'false'
46+ # run: composer config -g github-oauth.github.com ${{ secrets.COMPOSER_TOKEN }}
4847
4948 - name : Install dependencies
50- run : composer install -n --no-suggest
49+ run : composer install -n
5150
5251 - name : Run PhpUnit with coverage
5352 if : env.EXECUTE_COVERAGE == 'true'
5857 run : php vendor/bin/phpunit --testdox --colors=always
5958
6059 - name : Coverage monitor
61- if : env.EXECUTE_COVERAGE == 'true'
60+ if : env.MEASURE_COVERAGE == 'true'
6261 uses : slavcodev/coverage-monitor-action@v1
6362 with :
6463 github_token : ${{ secrets.GITHUB_TOKEN }}
8079
8180 - name : Setup PHP
8281 uses : shivammathur/setup-php@v2
82+ env :
83+ COMPOSER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8384 with :
8485 php-version : ${{ matrix.php-version }}
8586 extensions : mbstring, intl, curl, json
9899 ${{ runner.os }}-composer-
99100
100101 - name : Install dependencies
101- run : composer install -n --no-suggest
102+ run : composer install -n
102103
103104 - name : Lint code
104105 run : php vendor/bin/php-cs-fixer fix -vv --dry-run
0 commit comments