-
Notifications
You must be signed in to change notification settings - Fork 669
47 lines (39 loc) · 1.06 KB
/
code-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
43
44
45
46
47
name: Unit test coverage
on:
workflow_dispatch:
push:
paths:
- '**.php'
- 'composer.json'
- 'phpunit.xml.dist'
- 'code-coverage.yml'
pull_request:
paths:
- '**.php'
- 'composer.json'
- 'phpunit.xml.dist'
- 'code-coverage.yml'
jobs:
coverage:
if: (github.repository == 'irazasyed/telegram-bot-sdk') && !contains(github.event.head_commit.message, 'skip ci')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "latest"
coverage: pcov
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
composer-options: "--prefer-dist"
- name: Execute tests
run: vendor/bin/pest --coverage --coverage-clover build/pest.xml
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/pest.xml
verbose: true