-
Notifications
You must be signed in to change notification settings - Fork 3
106 lines (95 loc) · 4.48 KB
/
build.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# .github/workflows/build.yml
name: "Unit tests"
on: [ push ]
jobs:
build:
name: "PHP ${{ matrix.php-version }}${{ matrix.symfony-label }}"
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- php-version: "7.1"
- php-version: "7.2"
- php-version: "7.3"
- php-version: "7.4"
- php-version: "8.0"
- php-version: "8.1"
- php-version: "8.2"
- php-version: "8.3"
- php-version: "7.1"
symfony-version: "4.4.*"
symfony-label: ": Symfony 4.4.*"
- php-version: "7.2"
symfony-version: "5.0.*"
symfony-label: ": Symfony 5.0.*"
- php-version: "7.2"
symfony-version: "5.1.*"
symfony-label: ": Symfony 5.1.*"
- php-version: "7.2"
symfony-version: "5.2.*"
symfony-label: ": Symfony 5.2.*"
- php-version: "7.2"
symfony-version: "5.3.*"
symfony-label: ": Symfony 5.3.*"
- php-version: "7.2"
symfony-version: "5.4.*"
symfony-label: ": Symfony 5.4.*"
- php-version: "8.0"
symfony-version: "6.0.*"
symfony-label: ": Symfony 6.0.*"
- php-version: "8.1"
symfony-version: "6.1.*"
symfony-label: ": Symfony 6.1.*"
- php-version: "8.1"
symfony-version: "6.2.*"
symfony-label: ": Symfony 6.2.*"
- php-version: "8.1"
symfony-version: "6.3.*"
symfony-label: ": Symfony 6.3.*"
- php-version: "8.1"
symfony-version: "6.4.*"
symfony-label: ": Symfony 6.4.*"
- php-version: "8.2"
symfony-version: "7.0.*"
symfony-label: ": Symfony 7.0.*"
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Environment"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: "xdebug"
- name: "Dependencies"
run: |
php --version
composer --version
if [ "" != "${{ matrix.symfony-version }}" ]; then SYMFONY_VERSION=${{ matrix.symfony-version }}; else SYMFONY_VERSION="4.4.*"; fi;
if [ "6.2.*" == "${{ matrix.symfony-version }}" ]; then composer require "doctrine/dbal:^3.0" --no-update; fi;
if [ "7.0.*" != "${{ matrix.symfony-version }}" ]; then COMPOSER_MEMORY_LIMIT=-1 composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
COMPOSER_MEMORY_LIMIT=-1 composer update
- name: "Application"
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- name: "Coverage"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: php-${{ matrix.php-version }}
COVERALLS_PARALLEL: true
run: |
wget -c -nc --retry-connrefused --tries=0 https://github.com/php-coveralls/php-coveralls/releases/download/v2.5.3/php-coveralls.phar -O coveralls.phar
chmod +x coveralls.phar
php coveralls.phar --version
php coveralls.phar --coverage_clover=build/logs/clover.xml -v
coverage:
name: "Coverage"
runs-on: ubuntu-22.04
needs: "build"
if: always()
steps:
- name: "Coverage"
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true