Skip to content

Commit

Permalink
Move CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Dec 11, 2020
1 parent 2d9a1a1 commit c303c6d
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 23 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
phpunit:
runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
deps:
- "high"
include:
- php-version: "7.1"
deps: "low"

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

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

- name: Install composer dependencies
run: composer install --no-interaction --no-progress --no-suggest
if: ${{ matrix.deps == 'high' }}

- name: Install lowest composer dependencies
run: composer update --no-interaction --no-progress --no-suggest --prefer-lowest
if: ${{ matrix.deps == 'low' }}

- name: Run PHPUnit
run: vendor/bin/phpunit
if: ${{ matrix.php-version != '8.0' }}

- name: Run PHPUnit with coverage
run: |
mkdir -p mkdir -p build/logs
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
if: ${{ matrix.php-version == '8.0' }}

- name: Upload coverage report to Coveralls
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.php-version == '8.0' }}
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

0 comments on commit c303c6d

Please sign in to comment.