Skip to content

Commit 0f5085a

Browse files
petrparolekf3l1x
authored andcommitted
moved from Travis CI to GitHub Actions and added coveralls
1 parent a65a59e commit 0f5085a

File tree

3 files changed

+65
-15
lines changed

3 files changed

+65
-15
lines changed

.github/workflows/tests.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php: ['7.2', '7.3', '7.4']
11+
12+
fail-fast: false
13+
14+
name: PHP ${{ matrix.php }} tests
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: ${{ matrix.php }}
20+
extensions: json, mbstring, xml, tokenizer
21+
coverage: none
22+
23+
- run: composer install --no-interaction --prefer-source
24+
- run: vendor/bin/tester tests -s -C
25+
- if: failure()
26+
uses: actions/upload-artifact@v1
27+
with:
28+
name: output
29+
path: tests/PdfResponse/output
30+
31+
lowest_dependencies:
32+
name: Lowest Dependencies
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
- uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: 7.2
39+
extensions: json, mbstring, xml, tokenizer
40+
coverage: none
41+
42+
- run: composer update --no-interaction --prefer-dist --prefer-lowest --prefer-stable
43+
- run: vendor/bin/tester tests -s -C
44+
45+
46+
code_coverage:
47+
name: Code Coverage
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v2
51+
- uses: shivammathur/setup-php@v2
52+
with:
53+
php-version: 7.4
54+
extensions: json, mbstring, xml, tokenizer, xdebug
55+
coverage: none
56+
57+
- run: mkdir -p tests/tmp
58+
- run: composer install --no-progress --prefer-dist
59+
- run: wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
60+
- run: vendor/bin/tester -p phpdbg tests -s -C --coverage ./coverage.xml --coverage-src ./src
61+
- run: php coveralls.phar --verbose --config tests/.coveralls.yml

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/.coveralls.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# for php-coveralls
2+
service_name: github-actions
3+
coverage_clover: coverage.xml
4+
json_path: coverage.json

0 commit comments

Comments
 (0)