Skip to content

Commit 9e9f931

Browse files
committed
Chore/Update CI configuration for PHP 8.3 and improve caching
1 parent 5d4fc11 commit 9e9f931

3 files changed

Lines changed: 22 additions & 12 deletions

File tree

.github/workflows/documentation.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ on:
66

77
jobs:
88
publish:
9+
name: Publish Documentation
910
runs-on: ubuntu-latest
1011

11-
strategy:
12-
matrix:
13-
php-version: [ '8.2' ]
14-
1512
steps:
1613
- name: Checkout source code
17-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
1817

1918
- name: Install PHP
2019
uses: shivammathur/setup-php@v2
2120
with:
22-
php-version: ${{ matrix.php-version }}
21+
php-version: '8.3'
2322
extensions: mbstring
2423
coverage: xdebug
2524
tools: composer:v2

.github/workflows/sonar.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,28 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919

20-
- name: Set up PHP
20+
- name: Install PHP
2121
uses: shivammathur/setup-php@v2
2222
with:
2323
php-version: '8.3'
2424
coverage: xdebug
2525
tools: composer:v2
2626

27-
- name: Install dependencies
28-
run: composer install --prefer-dist --no-progress
27+
- name: Cache dependencies
28+
uses: actions/cache@v4.3.0
29+
with:
30+
path: ~/.composer/cache
31+
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
32+
restore-keys: php-${{ matrix.php-version }}-composer-
33+
34+
- name: Validate composer.json and composer.lock
35+
run: composer validate
36+
37+
- name: Install Dependencies
38+
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
2939

30-
- name: Run PHPUnit with coverage
31-
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml --log-junit=test.xml
40+
- name: Execute Unit, Integration and Acceptance Tests
41+
run: composer test
3242

3343
- name: Fix paths in coverage reports for Sonar
3444
run: |

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
test:
11+
name: Test on PHP ${{ matrix.php-version }}
1112
runs-on: ubuntu-latest
1213

1314
strategy:
@@ -37,7 +38,7 @@ jobs:
3738
- name: Validate composer.json and composer.lock
3839
run: composer validate
3940

40-
- name: Install dependencies
41+
- name: Install Dependencies
4142
if: steps.composer-cache.outputs.cache-hit != 'true'
4243
run: composer install --prefer-dist --no-progress --no-suggest
4344

0 commit comments

Comments
 (0)