Skip to content

Commit 8ba97df

Browse files
committed
Use GitHub Actions
1 parent 578efb8 commit 8ba97df

File tree

5 files changed

+60
-31
lines changed

5 files changed

+60
-31
lines changed

.gitattributes

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

.github/workflows/tests.yml

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

.travis.yml

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

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"symfony/finder": "^5.1"
2424
},
2525
"require-dev": {
26-
"phpunit/phpunit": "^8.4|^9.0",
27-
"mockery/mockery": "^1.3.1",
26+
"phpunit/phpunit": "^9.1",
27+
"mockery/mockery": "^1.3.2",
2828
"guzzlehttp/guzzle": "^6.5.5|^7.0.1",
2929
"orchestra/testbench": "^6.0",
3030
"illuminated/testing-tools": "^8.0"

tests/LoggableTraitOnMysqlTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ protected function setUpDatabase()
1919
{
2020
config([
2121
'database.default' => 'mysql',
22-
'database.connections.mysql.host' => '127.0.0.1',
2322
'database.connections.mysql.database' => '',
24-
'database.connections.mysql.username' => 'travis',
2523
]);
2624
}
2725

0 commit comments

Comments
 (0)