Skip to content

Commit 1450218

Browse files
committed
Fix GHA workflow
1 parent 1baab1f commit 1450218

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

.github/workflows/tests.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Tests
22
on: [pull_request, push]
33

4-
env:
5-
COMPOSER_TOKEN: false
6-
74
jobs:
85
unit-tests:
96
runs-on: ubuntu-latest
@@ -12,7 +9,7 @@ jobs:
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

@@ -21,6 +18,8 @@ jobs:
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'
@@ -58,7 +57,7 @@ jobs:
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 }}
@@ -80,6 +79,8 @@ jobs:
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
@@ -98,7 +99,7 @@ jobs:
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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"minimum-stability": "stable",
1919
"require": {
20-
"php": "^7.4"
20+
"php": "^7.4|^8.0"
2121
},
2222
"require-dev": {
2323
"phpunit/phpunit": "^9.5",

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)