Skip to content

Commit 10270c4

Browse files
authored
Use actions instead of Travis (#75)
* Use actions instead of Travis
1 parent 456655a commit 10270c4

File tree

2 files changed

+39
-21
lines changed

2 files changed

+39
-21
lines changed

.github/workflows/run-tests.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Run tests
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: '0 0 * * *'
7+
8+
jobs:
9+
php-tests:
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
php: [7.4, 7.3, 7.2, 7.1, 7.0]
15+
dependency-version: [prefer-lowest, prefer-stable]
16+
os: [ubuntu-latest, windows-latest]
17+
18+
name: PHP${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v1
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
extensions: mbstring
29+
30+
- name: Install dependencies
31+
run: |
32+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
33+
34+
- name: Execute Unit Tests
35+
run: vendor/bin/phpunit
36+
37+
- name: Check PSR-12 Codestyle
38+
run: vendor/bin/phpcs --standard=psr12 src/
39+
if: matrix.os == 'ubuntu-latest'

.travis.yml

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

0 commit comments

Comments
 (0)