Skip to content

Commit aef3416

Browse files
authored
Merge pull request #20 from barryvdh/patch-1
Replace Travis with Github Actions
2 parents 120572c + 652ba16 commit aef3416

File tree

3 files changed

+75
-17
lines changed

3 files changed

+75
-17
lines changed

.github/workflows/check-cs.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Check Codestyle
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
fix-style:
10+
name: Fix Code Style
11+
timeout-minutes: 15
12+
runs-on: ubuntu-latest
13+
env:
14+
COMPOSER_NO_INTERACTION: 1
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: 7.4
24+
coverage: none
25+
tools: composer
26+
27+
- name: Install dependencies
28+
run: |
29+
composer update --prefer-dist --no-suggest --no-progress
30+
31+
- name: Check Code Style
32+
run: vendor/bin/phpcs

.github/workflows/run-tests.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- "*"
10+
schedule:
11+
- cron: '0 0 * * *'
12+
13+
jobs:
14+
php-tests:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 15
17+
env:
18+
COMPOSER_NO_INTERACTION: 1
19+
20+
strategy:
21+
matrix:
22+
php: [8.*, 7.4, 7.3]
23+
dependency-version: [prefer-lowest, prefer-stable]
24+
25+
name: P${{ matrix.php }} - ${{ matrix.dependency-version }}
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v2
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
coverage: none
36+
tools: composer
37+
38+
- name: Install dependencies
39+
run: |
40+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
41+
42+
- name: Execute Unit Tests
43+
run: vendor/bin/phpunit

.travis.yml

-17
This file was deleted.

0 commit comments

Comments
 (0)