blob: 172c35212b36640575fac2f9a8b670fac94a26e2 (
plain)
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
|
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
name: Coverage
jobs:
coverage:
name: Coverage
runs-on: docker
container:
image: node:20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up php 8.3 with xdebug & composer
run: |
apt-get update
apt-get install -y php8.3 php8.3-cli php8.3-xdebug php8.3-mbstring php8.3-xml php8.3-curl php8.3-zip unzip
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"
echo "xdebug.mode=coverage" >> /etc/php/8.3/cli/php.ini
echo "xdebug.start_with_request=yes" >> /etc/php/8.3/cli/php.ini
php -v
composer --version
- name: Run tests and collect coverage
run: ./vendor/bin/phpunit tests --coverage-clover coverage.xml tests
|