Skip to content

Instantly share code, notes, and snippets.

@xxdannilinxx
Last active May 15, 2024 23:30

Revisions

  1. xxdannilinxx revised this gist May 15, 2024. 1 changed file with 0 additions and 12 deletions.
    12 changes: 0 additions & 12 deletions phplint.yml
    Original file line number Diff line number Diff line change
    @@ -16,18 +16,6 @@ jobs:
    - name: Copying test repository
    uses: actions/checkout@v3

    - name: Validate composer.json and composer.lock
    run: composer validate --strict

    - name: Cache Composer packages
    id: composer-cache
    uses: actions/cache@v3
    with:
    path: vendor
    key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
    restore-keys: |
    ${{ runner.os }}-php-
    - name: Run php lint
    uses: StephaneBour/actions-php-lint@8.0

  2. xxdannilinxx created this gist May 15, 2024.
    41 changes: 41 additions & 0 deletions phplint.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    name: PHP Linting

    on:
    pull_request:
    branches: ["master"]

    permissions:
    contents: read

    jobs:
    build:
    name: PHP Lint
    runs-on: ubuntu-latest

    steps:
    - name: Copying test repository
    uses: actions/checkout@v3

    - name: Validate composer.json and composer.lock
    run: composer validate --strict

    - name: Cache Composer packages
    id: composer-cache
    uses: actions/cache@v3
    with:
    path: vendor
    key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
    restore-keys: |
    ${{ runner.os }}-php-
    - name: Run php lint
    uses: StephaneBour/actions-php-lint@8.0

    - name: Run php check code with reviewdog
    uses: GeneaLabs/action-reviewdog-phpstan@1.1.2
    with:
    level: "error"
    fail_on_error: "true"
    phpstan_level: 4
    reporter: "github-pr-review"
    target_directory: "./"