Skip to content

Commit fb3df19

Browse files
committed
Use github actions
1 parent da0f63b commit fb3df19

File tree

4 files changed

+41
-37
lines changed

4 files changed

+41
-37
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
tests:
12+
strategy:
13+
matrix:
14+
operating-system: ubuntu-latest
15+
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
16+
runs-on: ${{ matrix.operating-system }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
- name: Setup PHP, with composer and extensions
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php-versions }}
24+
coverage: none
25+
- name: Get composer cache directory
26+
id: composer-cache
27+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
28+
- name: Cache composer dependencies
29+
uses: actions/cache@v2
30+
with:
31+
path: ${{ steps.composer-cache.outputs.dir }}
32+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
33+
restore-keys: ${{ runner.os }}-composer-
34+
- name: Install dependencies
35+
run: composer install --no-progress --prefer-dist --classmap-authoritative --no-interaction
36+
- name: Setup problem matchers for PHPUnit
37+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
38+
- name: Test with phpunit
39+
run: vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/
22
vendor/
3+
.phpunit.result.cache
34
composer.lock

.travis.yml

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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"psr/http-message": "^1.0"
2323
},
2424
"require-dev": {
25-
"phpunit/phpunit": "^5.7 || ^6.5"
25+
"phpunit/phpunit": "^5.7 || ^6.5 || ^9.4"
2626
},
2727
"autoload": {
2828
"psr-4": {

0 commit comments

Comments
 (0)