-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (41 loc) · 1.4 KB
/
test.yaml
File metadata and controls
47 lines (41 loc) · 1.4 KB
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
# OS: Linux; Symfony: latest stable; PHP: all the commonly used versions supported by this bundle
name: "Tests"
on:
pull_request:
push:
branches:
- 'main'
env:
fail-fast: true
jobs:
tests:
name: "PHP ${{ matrix.php-version }}"
runs-on: 'ubuntu-latest'
continue-on-error: false
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3', '8.4']
steps:
- name: 'Checkout code'
uses: actions/checkout@v5
- name: 'Install PHP with extensions'
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
php-version: ${{ matrix.php-version }}
tools: composer:v2
extensions: mbstring, intl
ini-values: date.timezone=UTC
- name: 'Install project dependencies'
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
vendor/bin/simple-phpunit install
- name: 'Run tests'
run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover ./coverage.xml
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage.xml