Skip to content

Commit a34ba1f

Browse files
committed
GH Actions: prevent more rate limiting issues
Follow up on 244. This adds the `GITHUB_TOKEN` to get round the rate limiting where necessary. It also adds `fail-fast` to get `setup-php` to exit with a non-zero exit code if something required in `tools` could not be installed (or other customizations failed). This prevents running unnecessary interim steps if a later step would never be able to succeed anyway.
1 parent 91d63bc commit a34ba1f

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.github/workflows/cs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
php-version: 'latest'
3333
coverage: none
3434
tools: cs2pr
35+
env:
36+
fail-fast: true
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3538

3639
# Install dependencies and handle caching in one go.
3740
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
@@ -70,6 +73,9 @@ jobs:
7073
php-version: '7.4'
7174
coverage: none
7275
tools: phpstan:2.x
76+
env:
77+
fail-fast: true
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7379

7480
# Install dependencies and handle caching in one go.
7581
# Dependencies need to be installed to make sure the PHPUnit classes are recognized.

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
php-version: ${{ matrix.php }}
3737
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
3838
coverage: none
39+
env:
40+
fail-fast: true
3941

4042
# YoastCS 3.0 has a PHP 7.2 minimum which conflicts with the requirements of this package.
4143
- name: 'Composer: remove YoastCS'

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ jobs:
107107
php-version: ${{ matrix.php }}
108108
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
109109
coverage: ${{ matrix.coverage == true && 'xdebug' || 'none' }}
110+
env:
111+
fail-fast: true
110112

111113
# YoastCS 3.0 has a PHP 7.2 minimum which conflicts with the requirements of this package.
112114
- name: 'Composer: remove YoastCS'

0 commit comments

Comments
 (0)