-
-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (33 loc) · 1.04 KB
/
pest-coverage.yml
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
name: Tests coverage
on: [ push, pull_request ]
jobs:
test:
name: Pest - coverage
runs-on: ubuntu-latest
services:
db:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: laravel
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: xdebug
- name: Install dependencies
run: composer install --prefer-dist --no-interaction
- name: Execute tests
env:
DB_PORT: ${{ job.services.db.ports['3306'] }}
run: XDEBUG_MODE=coverage ./vendor/bin/pest --coverage --min=100 --coverage-clover coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}