-
-
Notifications
You must be signed in to change notification settings - Fork 25
58 lines (44 loc) · 1.55 KB
/
Copy pathphpunit.yml
File metadata and controls
58 lines (44 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: PHPUnit Tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.3', '8.4', '8.5']
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
- name: Run php-cs-fixer
uses: OskarStark/php-cs-fixer-ga@3.13.0
- uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Apply php-cs-fixer changes
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Configure matchers
uses: mheap/phpunit-matcher-action@v1
- name: Run Tests
run: php vendor/bin/phpunit --log-junit=.build/junit.xml --coverage-clover .build/clover.xml --teamcity
- uses: EnricoMi/publish-unit-test-result-action@v2
if: github.actor != 'dependabot[bot]' && always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: .build/junit.xml
- name: Record Coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: php vendor/bin/php-coveralls --coverage_clover=.build/clover.xml --json_path=.build/coveralls-upload.json