-
-
Notifications
You must be signed in to change notification settings - Fork 5
83 lines (68 loc) · 1.99 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Coverage
on:
pull_request:
branches:
- "master"
push:
branches:
- "master"
env:
APP_ENV: test
jobs:
phpunit:
name: PHPUnit
runs-on: "ubuntu-20.04"
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
rabbitmq:
image: rabbitmq:3-alpine
ports:
- 5672:5672
redis:
image: redis:6-alpine
ports:
- 6379:6379
strategy:
matrix:
php:
- "7.4"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install PHP with PCOV
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: "pcov"
tools: composer:v2
extensions: pdo, pdo_mysql, curl, redis, amqp
ini-values: "date.timezone=Europe/Paris"
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies with Composer
uses: ramsey/composer-install@v3
- name: Create database
run: php bin/console doctrine:database:create --env=test
- name: Create schema
run: php bin/console doctrine:schema:create --env=test
- name: Load fixtures
run: php bin/console doctrine:fixtures:load --env=test -n
- name: Setup messenger queue
run: php bin/console messenger:setup-transports --env=dev
- name: Run PHPUnit (with coverage)
run: php bin/simple-phpunit -v --coverage-clover=coverage.xml
- name: Retrieve Coveralls phar
run: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.5.1/php-coveralls.phar
- name: Enable Coveralls phar
run: chmod +x php-coveralls.phar
- name: Upload to Coveralls
run: php php-coveralls.phar -v -x coverage.xml -o coveralls-upload.json
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}