Skip to content

Commit

Permalink
Merge pull request #30 from localheinz/feature/tests
Browse files Browse the repository at this point in the history
Enhancement: Run phpunit on GitHub Actions
  • Loading branch information
nikolaposa authored Aug 5, 2020
2 parents 0aad6e5 + 160fdf3 commit d8d8538
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
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

0 comments on commit d8d8538

Please sign in to comment.