Skip to content

Commit 57e657e

Browse files
committed
Use GitHub Actions
1 parent 27f7998 commit 57e657e

File tree

4 files changed

+46
-31
lines changed

4 files changed

+46
-31
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
.editorconfig export-ignore
77
.gitattributes export-ignore
88
.gitignore export-ignore
9-
.travis.yml export-ignore
109
phpunit.xml.dist export-ignore

.github/workflows/tests.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
php: [7.3, 7.4, 8.0]
12+
stability: [prefer-lowest, prefer-stable]
13+
14+
name: PHP ${{ matrix.php }} / ${{ matrix.stability }}
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php }}
24+
tools: composer:v2
25+
coverage: xdebug
26+
27+
- name: Setup problem matchers
28+
run: |
29+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
30+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
31+
32+
- name: Install dependencies
33+
uses: nick-invision/retry@v2
34+
with:
35+
timeout_minutes: 5
36+
max_attempts: 5
37+
command: composer update --prefer-dist --${{ matrix.stability }} --no-interaction --no-progress --ansi
38+
39+
- name: Run tests
40+
run: vendor/bin/phpunit --verbose --colors=always --coverage-clover ./build/logs/clover.xml
41+
42+
- name: Code coverage
43+
uses: codecov/codecov-action@v1
44+
with:
45+
file: ./build/logs/clover.xml

.travis.yml

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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"require-dev": {
2222
"phpunit/phpunit": "^8.4|^9.0",
23-
"mockery/mockery": "^1.3.1",
23+
"mockery/mockery": "^1.3.2",
2424
"orchestra/testbench": "^6.0",
2525
"illuminated/testing-tools": "^8.0",
2626
"predis/predis": "^1.1.1",

0 commit comments

Comments
 (0)