From 8602f1eb9db1f5d1e8d047eef2ad89d002132ef7 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Mon, 2 Oct 2023 12:36:20 +0200 Subject: [PATCH] Added code analysis action --- .github/workflows/pr.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 080fa373..20466f55 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -83,6 +83,36 @@ jobs: run: | composer coding-standards-check/phpcs + php-code-analysis: + name: PHP code analysis + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: [ '8.1' ] + dependency-version: [ prefer-lowest, prefer-stable ] + steps: + - uses: actions/checkout@master + - name: Setup PHP, with composer and extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: json + coverage: none + tools: composer:v2 + # https://github.com/shivammathur/setup-php#cache-composer-dependencies + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + - name: Code analysis + run: | + ./scripts/code-analysis + markdownlint: runs-on: ubuntu-latest name: markdownlint