Files
contao-leaflet-geocode-widget/.github/workflows/diagnostics.yml
dependabot[bot] 8f05dfe6d6 github-actions(deps): bump actions/cache from 1 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 1 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-29 12:41:22 +00:00

76 lines
2.0 KiB
YAML

name: Code Quality Diagnostics
on:
pull_request:
push:
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
name: PHP ${{ matrix.php }}
strategy:
fail-fast: false
matrix:
include:
- php: '7.4'
phpcq_install: 'install'
phpcq_flags: ''
- php: '8.0'
phpcq_install: 'update'
phpcq_flags: ''
- php: '8.1'
phpcq_install: 'update'
phpcq_flags: ''
steps:
- name: Pull source
uses: actions/checkout@v2
- 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@v3
env:
cache-name: composer-cache-dir-${{ matrix.php }}
with:
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@v3
env:
cache-name: vendor-${{ matrix.php }}
with:
path: $GITHUB_WORKSPACE/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: Install phpcq toolchain
run: $GITHUB_WORKSPACE/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
- name: Upload build directory to artifact
uses: actions/upload-artifact@v2
if: ${{ success() }} || ${{ failure() }}
with:
name: phpcq-builds-php-${{ matrix.php }}
path: .phpcq/build/