Skip to content

Commit e0533b1

Browse files
authored
PHP 8.0 support + Moved to Github Actions (#4)
1 parent faf1913 commit e0533b1

File tree

6 files changed

+70
-47
lines changed

6 files changed

+70
-47
lines changed

.github/workflows/run-tests.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: run-tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
php: [8.0, 7.4]
12+
laravel: [8.*, 7.*, 6.*]
13+
dependency-version: [prefer-lowest, prefer-stable]
14+
include:
15+
- laravel: 8.*
16+
testbench: 6.*
17+
- laravel: 7.*
18+
testbench: 5.*
19+
- laravel: 6.*
20+
testbench: 4.*
21+
22+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
23+
24+
services:
25+
mysql:
26+
image: mysql:5.7
27+
env:
28+
MYSQL_ALLOW_EMPTY_PASSWORD: no
29+
MYSQL_USER: protone_media_db_test
30+
MYSQL_DATABASE: protone_media_db_test
31+
MYSQL_PASSWORD: secret
32+
MYSQL_ROOT_PASSWORD: secret
33+
ports:
34+
- 3306
35+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
36+
37+
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v2
41+
42+
- name: Cache dependencies
43+
uses: actions/cache@v2
44+
with:
45+
path: ~/.composer/cache/files
46+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
47+
48+
- name: Setup PHP
49+
uses: shivammathur/setup-php@v2
50+
with:
51+
php-version: ${{ matrix.php }}
52+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql
53+
coverage: none
54+
55+
- name: Install dependencies
56+
run: |
57+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
58+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
59+
60+
- name: Execute tests
61+
run: vendor/bin/phpunit
62+
env:
63+
DB_DATABASE: protone_media_db_test
64+
DB_USERNAME: protone_media_db_test
65+
DB_PASSWORD: secret
66+
DB_PORT: ${{ job.services.mysql.ports[3306] }}

.styleci.yml

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

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Laravel Cross Eloquent Search
22

33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/protonemedia/laravel-cross-eloquent-search.svg?style=flat-square)](https://packagist.org/packages/protonemedia/laravel-cross-eloquent-search)
4-
[![Build Status](https://img.shields.io/travis/protonemedia/laravel-cross-eloquent-search/master.svg?style=flat-square)](https://travis-ci.org/protonemedia/laravel-cross-eloquent-search)
4+
![run-tests](https://github.com/protonemedia/laravel-cross-eloquent-search/workflows/run-tests/badge.svg)
55
[![Quality Score](https://img.shields.io/scrutinizer/g/protonemedia/laravel-cross-eloquent-search.svg?style=flat-square)](https://scrutinizer-ci.com/g/protonemedia/laravel-cross-eloquent-search)
66
[![Total Downloads](https://img.shields.io/packagist/dt/protonemedia/laravel-cross-eloquent-search.svg?style=flat-square)](https://packagist.org/packages/protonemedia/laravel-cross-eloquent-search)
77
[![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen)](https://plant.treeware.earth/protonemedia/laravel-cross-eloquent-search)

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.4",
19+
"php": "^7.4|^8.0",
2020
"illuminate/support": "^6.0|^7.0|^8.0"
2121
},
2222
"require-dev": {
23+
"mockery/mockery": "^1.3.3",
2324
"orchestra/testbench": "^4.0|^5.0|^6.0",
24-
"phpunit/phpunit": "^8.5"
25+
"phpunit/phpunit": "^8.5|^9.0"
2526
},
2627
"autoload": {
2728
"psr-4": {

phpunit.xml.dist

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,4 @@
2626
<log type="coverage-text" target="build/coverage.txt"/>
2727
<log type="coverage-clover" target="build/logs/clover.xml"/>
2828
</logging>
29-
<php>
30-
<server name="DB_USERNAME" value="travis"/>
31-
<server name="DB_PASSWORD" value=""/>
32-
</php>
3329
</phpunit>

0 commit comments

Comments
 (0)