Skip to content

Commit

Permalink
Enhance CI
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Feb 11, 2024
1 parent 99c57f9 commit 220e9b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions .composer-require-checker.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"GALETTE_IMPORTS_PATH",
"GALETTE_LOGS_PATH",
"GALETTE_MODE",
"GALETTE_DEBUG",
"GALETTE_NIGHTLY",
"GALETTE_PHOTOS_PATH",
"GALETTE_PLUGINS_PATH",
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ on:
pull_request:

jobs:
ubuntu-latest:
lint:
runs-on: ubuntu-latest
name: "Lint on PHP ${{ matrix.php-versions }}"

strategy:
matrix:
php-versions: [ '8.1', '8.3' ]
coverage: [none]
fail-fast: false

name: PHP ${{ matrix.php-versions }} on ubuntu-latest

steps:
- name: PHP
uses: shivammathur/setup-php@v2
Expand All @@ -31,15 +30,15 @@ jobs:
coverage: ${{ matrix.coverage }}

- name: Checkout Galette core
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: galette/galette
path: galette-core
fetch-depth: 1
ref: develop

- name: Checkout plugin
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: galette-core/galette/plugins/plugin-objectslend

Expand All @@ -49,7 +48,7 @@ jobs:
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -65,17 +64,22 @@ jobs:
cd galette-core/galette/plugins/plugin-objectslend
../../vendor/bin/phpcs lib/ ./*.php
- name: Twig CS
run: |
cd galette-core/galette/plugins/plugin-objectslend
../../vendor/bin/twigcs templates/default --severity error --display blocking
- name: Check missing symbols
run: |
cd galette-core/galette/plugins/plugin-objectslend
composer require maglnet/composer-require-checker -W
vendor/bin/composer-require-checker check --config-file=.composer-require-checker.config.json ../../composer.json
if: matrix.php-versions == '8.3'

- name: PHPStan checks
run: |
cd galette-core/galette/plugins/plugin-objectslend
../../vendor/bin/phpstan analyze --ansi --memory-limit=2G --no-interaction --no-progress
if: matrix.php-versions == '8.1'
- name: Headers checks
run: |
Expand Down

0 comments on commit 220e9b2

Please sign in to comment.