Skip to content

Commit 0b22f45

Browse files
authored
Merge pull request #2 from schantldev/php-8.2-gh-actions
Fix GH actions
2 parents a0460ef + 5934b3f commit 0b22f45

2 files changed

Lines changed: 36 additions & 39 deletions

File tree

.github/workflows/php.yml

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
name: PHP Composer
22

33
on:
4-
push:
5-
branches: [ "master" ]
6-
pull_request:
7-
branches: [ "master" ]
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["master"]
88

99
permissions:
10-
contents: read
10+
contents: read
1111

1212
jobs:
13-
build:
14-
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- uses: actions/checkout@v3
19-
20-
- name: Validate composer.json and composer.lock
21-
run: composer validate --strict
22-
23-
- name: Cache Composer packages
24-
id: composer-cache
25-
uses: actions/cache@v3
26-
with:
27-
path: vendor
28-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29-
restore-keys: |
30-
${{ runner.os }}-php-
31-
32-
- name: Install dependencies
33-
run: composer install --prefer-dist --no-progress
34-
35-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
36-
# Docs: https://getcomposer.org/doc/articles/scripts.md
37-
38-
# - name: Run test suite
39-
# run: composer run-script test
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Validate composer.json and composer.lock
20+
run: composer validate --strict
21+
22+
- name: Cache Composer packages
23+
id: composer-cache
24+
uses: actions/cache@v4
25+
with:
26+
path: vendor
27+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-php-
30+
31+
- name: Install dependencies
32+
uses: php-actions/composer@v6
33+
with:
34+
php_version: "8.2"
35+
36+
- name: Run tests
37+
uses: php-actions/composer@v6
38+
with:
39+
command: test
40+
php_version: "8.2"
41+
php_extensions: xdebug

phpunit.xml.dist

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@
1010
<directory>tests</directory>
1111
</testsuite>
1212
</testsuites>
13-
<coverage>
14-
<report>
15-
<html outputDirectory="build/coverage" />
16-
<text outputFile="build/coverage.txt" />
17-
<clover outputFile="build/logs/clover.xml" />
18-
</report>
19-
</coverage>
13+
2014
<logging>
2115
<junit outputFile="build/report.junit.xml" />
2216
</logging>
17+
2318
<source>
2419
<include>
2520
<directory suffix=".php">./src</directory>

0 commit comments

Comments
 (0)