-
Notifications
You must be signed in to change notification settings - Fork 22
52 lines (44 loc) · 1.3 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
name: Build
on:
push:
pull_request:
release:
types: [ published ]
permissions:
contents: read
pull-requests: write
jobs:
build:
name: Tests
runs-on: ubuntu-22.04
strategy:
matrix:
php-version:
- "5.6"
- "7.0"
- "7.1"
- "7.2"
- "7.4"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
- name: Install dependencies
run: |
composer update --no-ansi --no-interaction --no-progress
composer global require php-coveralls/php-coveralls
- name: Run tests
run: XDEBUG_MODE=coverage vendor/bin/phpunit tests --coverage-clover=build/logs/clover.xml
- name: Upload coverage results to Coveralls
env:
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: ${{ matrix.php-version }}"
COVERALLS_SERVICE_NAME: github
COVERALLS_SERVICE_JOB_ID: "${{ github.run_id }}"
COVERALLS_SERVICE_NUMBER: "${{ github.workflow }}-${{ github.run_number }}"
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: php-coveralls --coverage_clover=build/logs/clover.xml -v