Skip to content

Commit d5a96a5

Browse files
authored
Move from Travis CI to GitHub Actions (#242)
Move from TravisCI to GitHub Actions
1 parent 31fc3d4 commit d5a96a5

File tree

4 files changed

+68
-57
lines changed

4 files changed

+68
-57
lines changed

.github/workflows/static.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Static Analysis
2+
3+
on: ['push', 'pull_request']
4+
5+
jobs:
6+
ci:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php: ['7.2', '7.3', '7.4', '8.0']
11+
name: Code Style
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: ${{ matrix.php }}
21+
tools: composer:v2
22+
ini-values: pcov.directory=api #optional, see above for usage.
23+
coverage: pcov
24+
25+
- name: Install Dependencies
26+
run: composer update --no-interaction --no-progress
27+
28+
- name: Run PHPCS
29+
run: composer run cs
30+
31+
- name: Run PHPStan
32+
run: composer run static

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Tests
2+
3+
on: ['push', 'pull_request']
4+
5+
jobs:
6+
ci:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php: ['7.2', '7.3', '7.4', '8.0']
11+
12+
name: PHP ${{ matrix.php }}
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php }}
22+
tools: composer:v2
23+
coverage: xdebug
24+
25+
- name: Setup Problem Matches
26+
run: |
27+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
28+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
29+
30+
- name: Install PHP 7 dependencies
31+
run: composer update --no-interaction --no-progress
32+
33+
- name: Tests
34+
run: TERM=xterm-256color ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
35+
36+
- uses: codecov/codecov-action@v1

.travis.yml

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

appveyor.yml

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

0 commit comments

Comments
 (0)