2020-02-25 20:11:06 +01:00
|
|
|
name: CI
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
2020-04-07 15:04:20 +02:00
|
|
|
check-composer:
|
2020-02-25 20:11:06 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2020-04-07 15:04:20 +02:00
|
|
|
- name: Validate composer.json
|
2020-02-25 20:11:06 +01:00
|
|
|
run: composer validate
|
|
|
|
|
2020-04-07 15:04:20 +02:00
|
|
|
check-dependencies:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [check-composer]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get Composer Cache Directory
|
|
|
|
id: composer-cache
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-composer-
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: composer install --prefer-dist --no-progress --no-suggest --no-plugins
|
|
|
|
|
|
|
|
- name: Missing composer requirements
|
|
|
|
run: ./vendor/bin/composer-require-checker
|
|
|
|
|
|
|
|
full-check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [check-composer]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get Composer Cache Directory
|
|
|
|
id: composer-cache
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-composer-
|
|
|
|
|
2020-02-25 20:11:06 +01:00
|
|
|
- name: Install dependencies
|
|
|
|
run: composer install --prefer-dist --no-progress --no-suggest
|
|
|
|
|
2020-04-07 15:04:20 +02:00
|
|
|
- name: Coding Guideline
|
2020-02-25 20:11:06 +01:00
|
|
|
run: ./vendor/bin/phpcs
|
2020-02-25 21:19:18 +01:00
|
|
|
|
2020-04-07 15:04:20 +02:00
|
|
|
- name: Code Quality (by PHPStan)
|
2020-04-01 20:40:00 +02:00
|
|
|
run: ./vendor/bin/phpstan analyse
|
|
|
|
|
2020-04-07 15:04:20 +02:00
|
|
|
- name: PHPUnit Tests
|
2020-04-01 20:40:16 +02:00
|
|
|
run: ./vendor/bin/phpunit --testdox
|