mirror of
https://github.com/DanielSiepmann/tracking.git
synced 2024-11-25 22:56:12 +01:00
Daniel Siepmann
d3878d928d
* Adjust names of tasks. * Add composer require checker. * Install without plugins to not use custom installer and stay compatible with require checker. * Stay phpunit 10 compatible.
62 lines
1.7 KiB
YAML
62 lines
1.7 KiB
YAML
name: CI
|
|
on: [push]
|
|
jobs:
|
|
check-composer:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Validate composer.json
|
|
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-
|
|
|
|
- name: Install dependencies
|
|
run: composer install --prefer-dist --no-progress --no-suggest
|
|
|
|
- name: Coding Guideline
|
|
run: ./vendor/bin/phpcs
|
|
|
|
- name: Code Quality (by PHPStan)
|
|
run: ./vendor/bin/phpstan analyse
|
|
|
|
- name: PHPUnit Tests
|
|
run: ./vendor/bin/phpunit --testdox
|