Skip to content

Commit b0e2838

Browse files
committed
Fix diagnostics
1 parent 643dc8e commit b0e2838

File tree

1 file changed

+47
-25
lines changed

1 file changed

+47
-25
lines changed

.github/workflows/diagnostics.yml

Lines changed: 47 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,74 @@
11
name: MetaModels attribute_translatedcontentarticle
2-
32
on:
4-
push:
5-
branches-ignore:
6-
- '**-translation'
73
pull_request:
4+
push:
5+
branches:
86

97
jobs:
108
build:
119
runs-on: ubuntu-latest
10+
name: 'PHP: ${{ matrix.php }} Contao: ${{ matrix.contao }}'
1211
strategy:
12+
fail-fast: false
1313
matrix:
14-
php: [7.4]
15-
contao: [~4.9.0]
14+
php: [ '8.1', '8.2', '8.3' ]
15+
contao: [ '~4.13.0' ]
16+
phpcq_install: [ 'update' ]
17+
output: [ '-o github-action -o default' ]
1618

1719
steps:
18-
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Pull source
19-
uses: actions/checkout@v2
20-
with:
21-
fetch-depth: 0
20+
- name: Pull source
21+
uses: actions/checkout@v4
2222

23-
# see https://github.com/shivammathur/setup-php
24-
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Setup PHP.
23+
- name: Setup PHP with PECL extension
2524
uses: shivammathur/setup-php@v2
2625
with:
2726
php-version: ${{ matrix.php }}
28-
coverage: none
2927

30-
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Cache composer cache directory
31-
uses: actions/cache@v1
28+
# setup caches
29+
- name: Cache composer cache directory
30+
uses: actions/cache@v4
3231
env:
3332
cache-name: composer-cache-dir
3433
with:
3534
path: ~/.cache/composer
36-
key: ${{ runner.os }}-build-${{ env.cache-name }}
35+
key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}
3736

38-
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Cache vendor directory
39-
uses: actions/cache@v1
37+
- name: Cache vendor directory
38+
uses: actions/cache@v4
4039
env:
41-
cache-name: composer-vendor
40+
cache-name: vendor
4241
with:
4342
path: vendor
44-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
43+
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.contao }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
44+
restore-keys: |
45+
${{ runner.os }}-${{ matrix.php }}-${{ matrix.contao }}-build-${{ env.cache-name }}-
46+
47+
- name: Cache phpcq directory
48+
uses: actions/cache@v4
49+
env:
50+
cache-name: phpcq
51+
with:
52+
path: .phpcq
53+
key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/.phpcq.lock') }}
4554
restore-keys: |
46-
${{ runner.os }}-build-${{ env.cache-name }}-
55+
${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-
4756
48-
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Install composer dependencies
49-
run: composer update --prefer-dist --no-interaction --no-suggest
57+
# install dependencies and tools
58+
- name: Install composer dependencies
59+
run: |
60+
composer require contao/core-bundle ${{ matrix.contao }} --no-update
61+
composer install
62+
- name: Install phpcq toolchain
63+
run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v
5064

51-
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Run tests
52-
run: ant -keep-going
65+
# run tests
66+
- name: Run tests
67+
run: ./vendor/bin/phpcq run -v ${{ matrix.output }}
68+
69+
- name: Upload build directory to artifact
70+
uses: actions/upload-artifact@v4
71+
if: ${{ success() }} || ${{ failure() }}
72+
with:
73+
name: phpcq-builds-php-${{ matrix.php }}-${{ matrix.contao }}
74+
path: .phpcq/build/

0 commit comments

Comments
 (0)