Skip to content

Commit 99345dc

Browse files
committed
Switch to GitHub Actions
1 parent d01be58 commit 99345dc

File tree

3 files changed

+57
-51
lines changed

3 files changed

+57
-51
lines changed

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: PHP Lints
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run:
7+
runs-on: ubuntu-latest
8+
name: "PHP Lints"
9+
steps:
10+
- name: Setup PHP
11+
uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: 7.4
14+
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Install dependencies
19+
run: composer install --no-progress --prefer-dist --optimize-autoloader
20+
21+
- name: Lint with php-cs-fixer
22+
run: vendor/bin/php-cs-fixer fix --verbose --diff --dry-run --config=.php_cs
23+
24+
- name: Lint with phpcs
25+
run: vendor/bin/phpcs --standard=PSR2 src/

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: PHPUnit
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run:
7+
runs-on: ${{ matrix.operating-system }}
8+
strategy:
9+
matrix:
10+
operating-system: [ubuntu-latest, windows-latest, macos-latest]
11+
php-versions: ['7.2', '7.3', '7.4']
12+
name: "PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-system }}"
13+
steps:
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: ${{ matrix.php-versions }}
18+
tools: composer
19+
20+
- name: Setup problem matchers for PHPUnit
21+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
22+
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
with:
26+
submodules: true
27+
28+
- name: Install dependencies
29+
run: composer install --no-progress --prefer-dist --optimize-autoloader
30+
31+
- name: Test with phpunit
32+
run: vendor/bin/phpunit --coverage-text

.travis.yml

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

0 commit comments

Comments
 (0)