Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,44 @@ permissions:
contents: read

jobs:
static-analysis:
runs-on: ubuntu-latest

name: static-psalm-analysis
matrix:
runs-on: ubuntu-latest-low
outputs:
php-versions: ${{ steps.versions.outputs.php-versions }}
branches-max: ${{ steps.versions.outputs.branches-max }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Get php version
- name: Get php version matrix
id: versions
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1

- name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml

- name: Set up php${{ steps.versions.outputs.php-available }}
static-analysis:
runs-on: ubuntu-latest
needs: matrix
strategy:
fail-fast: false
matrix:
php-versions: ${{ fromJson(needs.matrix.outputs.php-versions) }}

name: Psalm Static Analysis (PHP ${{ matrix.php-versions }})

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
with:
php-version: ${{ steps.versions.outputs.php-available }}
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage: none
ini-file: development
Expand All @@ -53,7 +70,8 @@ jobs:
composer i

- name: Install nextcloud/ocp
run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies
run: composer require --dev nextcloud/ocp:dev-${{ needs.matrix.outputs.branches-max }} --ignore-platform-reqs --with-dependencies

- name: Run coding standards check
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github

Loading