Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #111 from morozov/phpunit-on-github-actions
Browse files Browse the repository at this point in the history
Switching from Travis CI to GitHub Actions for running PHPUnit with code coverage
  • Loading branch information
morozov committed May 24, 2020
2 parents 13fda2b + 45d325e commit bab8be9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -70,6 +70,41 @@ jobs:
- name: Run Psalm
run: vendor/bin/psalm --shepherd --output-format=github --threads=4

phpunit:
name: PHPUnit
runs-on: ubuntu-18.04

strategy:
matrix:
php-version:
- "7.4"

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

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

- name: Cache dependencies installed with composer
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-"

- name: Install dependencies with composer
run: composer install --no-interaction --no-progress --no-suggest

- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload Code Coverage
uses: codecov/codecov-action@v1

infection:
name: Infection
runs-on: ubuntu-18.04
Expand Down
7 changes: 0 additions & 7 deletions .travis.yml
Expand Up @@ -15,10 +15,3 @@ jobs:
php: 7.4
before_install: pecl install ast
script: vendor/bin/phan --progress-bar --color

- env: PHPUnit
php: 7.4
script:
- vendor/bin/phpunit --coverage-clover=coverage.xml
after_success:
- bash <(curl -s https://codecov.io/bash)

0 comments on commit bab8be9

Please sign in to comment.