Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Run phpunit on GitHub Actions #30

Merged
merged 1 commit into from
Aug 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,42 @@ jobs:

- name: Run friendsofphp/php-cs-fixer
run: vendor/bin/php-cs-fixer fix -v --diff --dry-run

tests:
name: Tests

runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- 7.2
- 7.3
- 7.4

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

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

- name: Determine composer cache directory
id: determine-composer-cache-directory
run: echo "::set-output name=directory::$(composer config cache-dir)"

- name: Cache dependencies installed with composer
uses: actions/cache@v2
with:
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: php-${{ matrix.php-version }}-composer-

- name: Install dependencies
run: composer install --no-interaction

- name: Run phpunit/phpunit
run: vendor/bin/phpunit
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ cache:

php:
- 7.2
- 7.3
- 7.4

install:
- travis_retry composer install --no-interaction

script: ./vendor/bin/phpunit

jobs:
include:
- stage: Code coverage
Expand Down