-
Notifications
You must be signed in to change notification settings - Fork 13
49 lines (48 loc) · 1.5 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
name: Test on ${{ matrix.php-versions }}
steps:
- uses: actions/checkout@v4
- name: install Ghostscript
run: sudo apt-get install -y ghostscript
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: install dependencies
run: composer install
- name: Run Unit-Tests
run: ./vendor/bin/phpunit --testdox --coverage-text
coverage:
needs: test
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: install Ghostscript
run: sudo apt-get install -y ghostscript
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
coverage: xdebug
- name: install dependencies
run: composer install
- name: install tools
run: composer install
- name: run testsuite
run: ./vendor/bin/phpunit --testdox --colors=always --coverage-clover clover.xml
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=clover.xml -v