From 47b0e674346cd388b4c560d0dc2ce74f23180b40 Mon Sep 17 00:00:00 2001 From: Ingolf Steinardt Date: Fri, 17 May 2024 21:36:45 +0200 Subject: [PATCH] Fix diagostics --- .github/workflows/diagnostics.yml | 36 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/diagnostics.yml b/.github/workflows/diagnostics.yml index 17b2073..1b34c3f 100644 --- a/.github/workflows/diagnostics.yml +++ b/.github/workflows/diagnostics.yml @@ -4,32 +4,31 @@ on: pull_request: push: branches: - - master - - 'hotfix/*' - - 'release/*' jobs: build: runs-on: ubuntu-latest - name: PHP ${{ matrix.php }} + name: 'PHP: ${{ matrix.php }} Contao: ${{ matrix.contao }}' strategy: fail-fast: false matrix: - php: ['8.1', '8.2'] - phpcq_install: ['update'] - output: ['-o github-action -o default'] + php: [ '8.2', '8.3' ] + contao: [ '~5.3.0' ] + phpcq_install: [ 'update' ] + output: [ '-o github-action -o default' ] steps: - name: Pull source - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP with PECL extension uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} + # setup caches - name: Cache composer cache directory - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: composer-cache-dir with: @@ -37,17 +36,17 @@ jobs: key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }} - name: Cache vendor directory - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: vendor with: path: vendor - key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.contao }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}- + ${{ runner.os }}-${{ matrix.php }}-${{ matrix.contao }}-build-${{ env.cache-name }}- - name: Cache phpcq directory - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: phpcq with: @@ -56,18 +55,21 @@ jobs: restore-keys: | ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}- + # install dependencies and tools - name: Install composer dependencies - run: composer install - + run: | + composer require contao/core-bundle ${{ matrix.contao }} --no-update + composer install - name: Install phpcq toolchain run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v + # run tests - name: Run tests run: ./vendor/bin/phpcq run -v ${{ matrix.output }} - name: Upload build directory to artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ success() }} || ${{ failure() }} with: - name: phpcq-builds-php-${{ matrix.php }} + name: phpcq-builds-php-${{ matrix.php }}-${{ matrix.contao }} path: .phpcq/build/