From 48f82fe322d1254090c660ebee612a92cab89613 Mon Sep 17 00:00:00 2001 From: David Lienhard Date: Fri, 4 Dec 2020 10:14:29 +0100 Subject: [PATCH] improve check workflow add matrix to check php `8.0` & `7.4` use `davidlienhard/php-simple-lint@v1` as linter --- .github/workflows/check.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 60f7e1f..60b0802 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -5,16 +5,23 @@ on: push jobs: check: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: ['ubuntu-latest'] + php: ['8.0', '7.4'] + + name: PHP ${{ matrix.php }} - ${{ matrix.os }} steps: - uses: actions/checkout@v2 - run: git fetch origin master - - name: Setup PHP + - name: Setup PHP ${{ matrix.php }} uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: ${{ matrix.php }} - name: Get composer cache directory id: composer-cache @@ -24,8 +31,8 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- + key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- - name: Validate composer.json and composer.lock run: composer validate @@ -33,8 +40,11 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-progress - - name: Run phplint - uses: StephaneBour/actions-php-lint@7.4 + - name: Run PHP Simple Lint + uses: davidlienhard/php-simple-lint@v1 + with: + folder: './' + ignore: './vendor/\*' - name: Show changed files run: composer changed-files