Skip to content

Commit 1a89edb

Browse files
committed
#2 Move from Travis to GitHub actions
1 parent b4bb8e1 commit 1a89edb

File tree

6 files changed

+66
-18
lines changed

6 files changed

+66
-18
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Ignore all test and documentation with "export-ignore".
22
/.gitattributes export-ignore
33
/.gitignore export-ignore
4-
/.travis.yml export-ignore
54
/phpunit.xml export-ignore
65
/tests export-ignore

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: composer
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
open-pull-requests-limit: 50
8+
labels:
9+
- "dependencies"

.github/run-tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: run-tests
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: [ ubuntu-latest ]
12+
php: [ 8.0, 8.1 ]
13+
laravel: [ 8.* ]
14+
dependency-version: [ prefer-stable ]
15+
include:
16+
- laravel: 8.*
17+
18+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
extensions: curl
29+
coverage: none
30+
31+
- name: Setup problem matchers
32+
run: |
33+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
34+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
35+
36+
- name: Install dependencies
37+
run: |
38+
composer install --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-progress --no-scripts
39+
env:
40+
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
41+
42+
- name: Execute tests
43+
run: composer test

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
/vendor
22
composer.phar
33
composer.lock
4+
auth.json
5+
6+
phpunit.xml
47
.phpunit.result.cache
8+
59
.DS_Store
6-
.idea/*
10+
Thumbs.db
11+
/.idea

.travis.yml

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

phpunit.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
4+
backupGlobals="false"
35
backupStaticAttributes="false"
46
bootstrap="vendor/autoload.php"
57
colors="true"
@@ -10,6 +12,11 @@
1012
stopOnFailure="false"
1113
verbose="true"
1214
>
15+
<coverage>
16+
<include>
17+
<directory suffix=".php">src/</directory>
18+
</include>
19+
</coverage>
1320
<testsuites>
1421
<testsuite name="GeoIP Package Test Suite">
1522
<directory>./tests</directory>

0 commit comments

Comments
 (0)