initial config

This commit is contained in:
Oleg Bespalov
2020-10-01 15:44:29 +02:00
parent a80cd34cf1
commit 0bb0f580d0
2 changed files with 40 additions and 21 deletions

40
.github/workflows/php.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Code Checks
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run:
runs-on: self-hosted
strategy:
matrix:
php-versions: ['7.1', '7.2']
name: PHP ${{ matrix.php-versions }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
env:
runner: self-hosted
- 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: Tests Coverage
run: vendor/bin/phpunit --coverage-clover=coverage.xml

View File

@@ -1,21 +0,0 @@
language: php
php:
- 7.1
- 7.2
before_script:
- composer self-update
- composer install --prefer-source --no-interaction
script:
- vendor/bin/phpunit --coverage-clover=coverage.xml
after_success:
# Submit coverage report to https://codecov.io
- bash <(curl -s https://codecov.io/bash)
# You can delete the cache using travis-ci web interface
cache:
directories:
- $HOME/.composer/cache