Skip to content

feat: add versioned import contract foundation #10

feat: add versioned import contract foundation

feat: add versioned import contract foundation #10

Workflow file for this run

# SPDX-FileCopyrightText: 2026 LibreCode Coop and LibreCode contributors
#
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Static analysis
on:
pull_request:
permissions:
contents: read
concurrency:
group: psalm-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
static-analysis:
runs-on: ubuntu-latest
name: static-psalm-analysis
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Get php version
id: versions
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
- 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 }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
with:
php-version: ${{ steps.versions.outputs.php-available }}
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
ini-values: disable_functions=
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: |
composer remove nextcloud/ocp --dev --no-scripts
composer i
- name: Check for vulnerable PHP dependencies
run: composer require --dev roave/security-advisories:dev-latest
- name: Install nextcloud/ocp
run: |
composer require --dev \
nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} \
--ignore-platform-reqs \
--with-dependencies
- name: Run Psalm
run: |
composer run psalm -- \
--threads=1 \
--monochrome \
--no-progress \
--output-format=github