Skip to content

Commit e4dd199

Browse files
authored
Move from Travis CI to GitHub Actions (#32)
1 parent 59a0b98 commit e4dd199

File tree

2 files changed

+48
-31
lines changed

2 files changed

+48
-31
lines changed

.github/workflows/code_checks.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
php: [ '7.2', '7.3', '7.4' ]
17+
laravel: [ '5.5.*', '5.6.*', '5.7.*', '5.8.*', '^6.0', '^7.0' ]
18+
19+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- uses: actions/cache@v1
25+
with:
26+
path: ~/.composer/cache/files
27+
key: laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
28+
29+
- uses: shivammathur/setup-php@v1
30+
with:
31+
php-version: ${{ matrix.php }}
32+
coverage: xdebug
33+
34+
- name: Validate composer.json and composer.lock
35+
run: composer validate
36+
37+
- name: Install dependencies
38+
run: |
39+
composer require "illuminate/support:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" --no-interaction --no-update
40+
composer update --prefer-dist --no-interaction --no-suggest
41+
42+
- name: Run test
43+
run: ./vendor/bin/phpunit --coverage-clover=coverage.clover --verbose
44+
45+
- name: External Code Coverage
46+
run: |
47+
wget https://scrutinizer-ci.com/ocular.phar
48+
php ocular.phar code-coverage:upload --format=php-clover coverage.clover

.travis.yml

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

0 commit comments

Comments
 (0)