Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bennothommo committed Dec 9, 2024
1 parent 8dd2c53 commit f7ddb0c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 41 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ name: Code Quality

on:
push:
branches:
- main
pull_request:

concurrency:
group: phpcs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
php:
runs-on: ubuntu-latest
name: PHP
steps:
- name: Cancel previous incomplete runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout changes
uses: actions/checkout@v2
with:
Expand All @@ -22,7 +23,7 @@ jobs:
- name: Install PHP and PHP Code Sniffer
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.4
tools: phpcs

- name: Check code quality
Expand Down
44 changes: 9 additions & 35 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ name: Tests

on:
push:
branches:
- main
pull_request:

concurrency:
group: phpunit-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
phpUnit:
strategy:
max-parallel: 3
max-parallel: 6
matrix:
phpVersion: ['7.4', '8.0', '8.1', '8.2']
phpVersion: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
fail-fast: false
runs-on: ubuntu-latest
name: PHPUnit / PHP ${{ matrix.phpVersion }}
steps:
- name: Cancel previous incomplete runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout changes
uses: actions/checkout@v2

Expand All @@ -27,17 +28,6 @@ jobs:
with:
php-version: ${{ matrix.phpVersion }}

- name: Setup dependency cache
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-scripts

Expand All @@ -47,29 +37,13 @@ jobs:
runs-on: ubuntu-latest
name: Static Analysis
steps:
- name: Cancel previous incomplete runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout changes
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2

- name: Setup dependency cache
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
php-version: 8.4

- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-scripts
Expand Down

0 comments on commit f7ddb0c

Please sign in to comment.