Skip to content

Commit

Permalink
Added code analysis action
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi-itk committed Oct 2, 2023
1 parent 1b9fc14 commit 8602f1e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8602f1e

Please sign in to comment.