-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7105 from Automattic/add/psalm-pipeline
Add Psalm workflow
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Psalm Test | ||
|
||
on: | ||
pull_request: | ||
workflow_call: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tests: | ||
name: Psalm | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
max-parallel: 10 | ||
matrix: | ||
php: ['7.3', '8.2'] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get cached composer directories | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/composer/ | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: vendor/ | ||
key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer | ||
coverage: none | ||
|
||
- name: Install | ||
run: composer install --no-ansi --no-interaction --prefer-dist --no-progress | ||
|
||
- name: Run Psalm | ||
run: ./vendor/bin/psalm |