Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: various improvements to the workflows #76

Merged
merged 4 commits into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@ on:
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
grogy marked this conversation as resolved.
Show resolved Hide resolved
cancel-in-progress: true

jobs:
bundle:
# Don't run on forks.
if: github.repository == 'php-parallel-lint/PHP-Parallel-Lint'

name: Bundle binary
runs-on: ubuntu-latest

Expand All @@ -22,7 +31,7 @@ jobs:
php-version: 8.0
extensions: exif, phar, openssl
coverage: none
ini-values: phar.readonly=Off
ini-values: phar.readonly=Off, error_reporting=-1, display_errors=On, zend.assertions=1

- name: Install Composer dependencies
uses: ramsey/composer-install@v1
Expand All @@ -49,7 +58,7 @@ jobs:
verify:
name: Validate binary on PHP ${{ matrix.php }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental == true }}
continue-on-error: ${{ matrix.php == '8.2' }}
needs:
- bundle

Expand All @@ -68,10 +77,6 @@ jobs:
- '8.1'
- '8.2'

include:
- php: '8.2'
experimental: true

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -84,6 +89,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: error_reporting=-1, display_errors=On, zend.assertions=1
coverage: none

- name: Run linter against codebase
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ on:
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Run style linter
Expand Down Expand Up @@ -48,7 +54,7 @@ jobs:
php-version: 8.0
extensions: exif, phar, openssl
coverage: none
ini-values: phar.readonly=Off, error_reporting=E_ALL, display_errors=On
ini-values: phar.readonly=Off, error_reporting=-1, display_errors=On, zend.assertions=1

- name: Install Composer dependencies
uses: ramsey/composer-install@v1
Expand All @@ -75,7 +81,7 @@ jobs:
test:
name: Run tests on PHP ${{ matrix.php }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental == true }}
continue-on-error: ${{ matrix.php == '8.2' }}
needs:
- bundle

Expand All @@ -95,10 +101,6 @@ jobs:
- '8.1'
- '8.2'

include:
- php: '8.2'
experimental: true

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -107,7 +109,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: error_reporting=E_ALL, display_errors=On
ini-values: error_reporting=-1, display_errors=On, zend.assertions=1
coverage: none

# Remove PHPCS as it has a minimum PHP requirements of PHP 5.4 and would block install on PHP 5.3.
Expand Down