tracking/.github/workflows/ci.yaml

63 lines
1.7 KiB
YAML
Raw Normal View History

2020-02-25 20:11:06 +01:00
name: CI
on: [push]
jobs:
check-composer:
2020-02-25 20:11:06 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate composer.json
2020-02-25 20:11:06 +01:00
run: composer validate
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
- name: Coding Guideline
2020-02-25 20:11:06 +01:00
run: ./vendor/bin/phpcs
2020-02-25 21:19:18 +01:00
- name: Code Quality (by PHPStan)
run: ./vendor/bin/phpstan analyse
- name: PHPUnit Tests
run: ./vendor/bin/phpunit --testdox