From d9b743ddc3d44c2ce33757410a5b1b42de3dcb12 Mon Sep 17 00:00:00 2001 From: jakubenglicky Date: Fri, 26 Mar 2021 09:12:20 +0100 Subject: [PATCH] =?UTF-8?q?Sjednocen=C3=AD=20Github=20Actions=20nap=C5=99?= =?UTF-8?q?=C3=AD=C4=8D=20organizac=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/php-package-ci.yml | 21 ++++++++++++++++++ .github/workflows/static_analysis.yml | 32 --------------------------- Makefile | 6 +++++ 3 files changed, 27 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/php-package-ci.yml delete mode 100644 .github/workflows/static_analysis.yml create mode 100644 Makefile diff --git a/.github/workflows/php-package-ci.yml b/.github/workflows/php-package-ci.yml new file mode 100644 index 0000000..aaf9efe --- /dev/null +++ b/.github/workflows/php-package-ci.yml @@ -0,0 +1,21 @@ +name: Package CI + +on: + pull_request: + +jobs: + checks: + name: Checks + runs-on: ubuntu-latest + strategy: + matrix: + php: [ 7.4, 8.0 ] + steps: + - uses: actions/checkout@v2 + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - run: make composer + + - run: make phpstan diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml deleted file mode 100644 index 4ed305f..0000000 --- a/.github/workflows/static_analysis.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Statická analýza - -on: - pull_request: - branches: [ master ] - -jobs: - phpstan: - name: PHPStan - runs-on: ubuntu-latest - steps: - - name: Informace o prostředí - run: | - env - - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.0 - tools: composer - - - name: Composer - run: | - composer validate - composer install - - - name: PHPStan - run: | - vendor/bin/phpstan analyse src/ --level 8 --no-progress --error-format github diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5c6e42f --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +composer: + composer validate + composer update --no-interaction --prefer-dist + +phpstan: + vendor/bin/phpstan analyse src/ --level 8 --no-progress --error-format github