Skip to content

Commit 4edef3b

Browse files
committed
use github-ci instead of travis-ci
1 parent 7192b94 commit 4edef3b

File tree

2 files changed

+41
-45
lines changed

2 files changed

+41
-45
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
tags:
8+
- '[0-9].[0-9]+'
9+
pull_request:
10+
11+
jobs:
12+
test:
13+
name: "PHPUnit"
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
php-version: ['7.2', '7.3', '7.4', '8.0']
18+
include:
19+
- php-version: '7.2'
20+
composer-flags: '--prefer-stable --prefer-lowest'
21+
steps:
22+
- name: Check out code into the workspace
23+
uses: actions/checkout@v2
24+
- name: Setup PHP ${{ matrix.php-version }}
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php-version }}
28+
- name: Validate composer.json
29+
run: composer validate --strict --no-check-lock
30+
- name: Composer cache
31+
uses: actions/cache@v2
32+
with:
33+
path: ${{ env.HOME }}/.composer/cache
34+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
35+
- name: Install dependencies
36+
run: composer update ${{ matrix.composer-flags }} --prefer-dist --no-interaction
37+
- name: PHPStan
38+
if: ${{ matrix.php-version == '8.0' }}
39+
run: composer phpstan-all
40+
- name: Run tests
41+
run: composer phpunit

.travis.yml

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

0 commit comments

Comments
 (0)