forked from peviitor-ro/api
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (25 loc) · 780 Bytes
/
Copy pathphpunit.yml
File metadata and controls
32 lines (25 loc) · 780 Bytes
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
name: Run PHPUnit Tests
on:
pull_request:
branches: [ master ]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Check out repo code
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: phpunit # Ensure phpunit is available
coverage: xdebug # Enable xdebug for coverage
- name: Update dependencies
run: composer update --prefer-dist --no-progress
- name: Run PHPUnit tests and generate report
run: vendor/bin/phpunit --configuration phpunit.xml --coverage-html coverage-report
- name: Archive coverage reports
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage-report/