Skip to content

Commit

Permalink
Merge pull request #25 from spinen/feature/replaceTravisWithGithubAct…
Browse files Browse the repository at this point in the history
…ions

Replace Travis with Github Actions
  • Loading branch information
ssfinney authored Apr 24, 2020
2 parents 45f8795 + 8784abc commit 276e727
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 46 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
pull_request:

jobs:
tests:

runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [7.2, 7.3, 7.4]
stability: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov

- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest

- name: Execute tests
run: vendor/bin/phpunit --coverage-clover=coverage.clover --verbose

- name: Upload Code Coverage
run: wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

0 comments on commit 276e727

Please sign in to comment.