Skip to content

Commit 6ba05dd

Browse files
committed
Start using github actions
Travis is very slow
1 parent a580b90 commit 6ba05dd

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/ci.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
tests:
5+
name: Tests
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
matrix:
9+
os: [ubuntu-latest, macos-latest]
10+
php: ['7.3', '7.4']
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: ${{ matrix.php }}
17+
tools: phpunit, git
18+
coverage: pcov
19+
- name: Get composer cache directory
20+
id: composer-cache
21+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
22+
- name: Cache composer dependencies
23+
uses: actions/cache@v1
24+
with:
25+
path: ${{ steps.composer-cache.outputs.dir }}
26+
# Use composer.json for key, if composer.lock is not committed.
27+
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
28+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
29+
restore-keys: ${{ runner.os }}-composer-
30+
- name: Install Composer dependencies
31+
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
32+
- name: PHPUnit
33+
run: vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-text
34+
- uses: codecov/codecov-action@v1
35+
with:
36+
file: ./coverage.xml

0 commit comments

Comments
 (0)