Skip to content

Commit

Permalink
Update Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bennothommo committed Jul 3, 2024
1 parent 3ac665d commit 3196a90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 36 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- 2.0/dev
pull_request:

jobs:
Expand All @@ -13,13 +12,15 @@ jobs:
name: Code Quality
steps:
- name: Checkout changes
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install PHP and PHP Code Sniffer
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '8.3'
tools: phpcs

- name: Run code quality checks
run: phpcs -n --colors --extensions="php" .
37 changes: 4 additions & 33 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,60 +11,31 @@ jobs:
strategy:
max-parallel: 6
matrix:
phpVersion: ['7.3', '7.4', '8.0', '8.1']
phpVersion: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
fail-fast: false
runs-on: ubuntu-latest
name: Linux / PHP ${{ matrix.phpVersion }}
env:
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml
key: assetic-php-cache-v1
steps:
- name: Checkout changes
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install NPM dependencies
run: |
sudo apt-get -y install jpegoptim libjpeg-progs optipng
npm install
- name: Setup extension cache
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.phpVersion }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v2
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.phpVersion }}
tools: composer
extensions: ${{ env.extensions }}

- 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-
extensions: curl, mbstring, xml

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

- name: Setup problem matchers for PHPUnit
if: matrix.phpVersion == '7.4'
if: matrix.phpVersion == '8.3'
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run tests
Expand Down

0 comments on commit 3196a90

Please sign in to comment.