Skip to content

Commit

Permalink
Update diagnostics.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolineus committed Sep 25, 2024
1 parent ba812b2 commit 2fb0be0
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions .github/workflows/diagnostics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,19 @@ jobs:
fail-fast: false
matrix:
include:
- php: '7.4'
phpcq_install: 'install'
phpcq_flags: ''
- php: '8.0'
- php: 8.2
phpcq_install: 'update'
phpcq_flags: ''
- php: '8.1'
- php: 8.3
phpcq_install: 'update'
phpcq_flags: ''
- php: '8.2'
phpcq_install: 'update'
phpcq_flags: ''

steps:
- name: Pull source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug2

- name: Cache composer cache directory
uses: actions/cache@v1
Expand All @@ -48,30 +39,37 @@ jobs:
path: ~/.cache/composer
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Install composer dependencies
run: composer install

- name: Cache vendor directory of phpcq tool runner
uses: actions/cache@v1
- name: Cache vendor directory
uses: actions/cache@v3
env:
cache-name: vendor-${{ matrix.php }}
with:
path: $GITHUB_WORKSPACE/vendor
path: vendor
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Update phpcq
run: $GITHUB_WORKSPACE/vendor/bin/phpcq self-update --unsigned
- name: Cache phpcq directory
uses: actions/cache@v3
env:
cache-name: phpcq-${{ matrix.php }}
with:
path: .phpcq
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/.phpcq.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install composer dependencies
run: composer install

- name: Install phpcq toolchain
run: $GITHUB_WORKSPACE/vendor/bin/phpcq ${{ matrix.phpcq_install }} -v
run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v

- name: Run tests
run: $GITHUB_WORKSPACE/vendor/bin/phpcq run -o github-action -o default ${{ matrix.phpcq_flags }} -v
run: ./vendor/bin/phpcq run -v -o github-action -o default --threshold=info

- name: Upload build directory to artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ success() }} || ${{ failure() }}
with:
name: phpcq-builds-php-${{ matrix.php }}
Expand Down

0 comments on commit 2fb0be0

Please sign in to comment.