Create test.yml

This commit is contained in:
Anton Medvedev 2020-09-28 09:52:04 +03:00 committed by GitHub
parent b633e98fd3
commit e2875b4dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

34
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: php vendor/bin/phpunit