Skip to content

Commit

Permalink
feat: add phpstan (#35) 🛠️
Browse files Browse the repository at this point in the history
* feat: add phpstant

* feat: configure phpstant

* fix: phpstan error

* fix: path to sources

* fix: align checks
  • Loading branch information
maratsh authored Dec 19, 2024
1 parent 494653e commit a4fadf6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 16 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/branch.yaml → .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,38 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
ref: ${{ github.head_ref }}

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
php-version: '8.4'
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Validate dependencies
uses: php-actions/composer@master
with:
command: validate
- name: Install dependencies
run: composer install
uses: php-actions/composer@v6

- name: Lint PHP files
uses: overtrue/phplint@main
with:
path: .
options: --exclude=vendor

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
- name: create empty .env file.
run: echo "" > tests/Helpers/.env

- uses: php-actions/phpstan@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
path: src/AuthProvider src/Common
level: 5
memory_limit: 2048m
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
Expand Down Expand Up @@ -59,6 +60,9 @@ jobs:
app_id: ${{ secrets.RELEASE_BOT_APP_ID }}
private_key: ${{ secrets.RELEASE_BOT_PKEY }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v4
with:
node-version: lts/*
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a4fadf6

Please sign in to comment.