From a5d15d06081e857d8c226fab6012556a17b8ef57 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Wed, 29 May 2024 17:50:58 +0200 Subject: [PATCH] add psalm baseline Signed-off-by: Julien Veyssier --- .github/workflows/phpunit.yml | 2 +- .github/workflows/psalm.yml | 4 +-- composer.json | 2 ++ psalm.xml | 2 ++ tests/psalm-baseline.xml | 51 +++++++++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 tests/psalm-baseline.xml diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 2dc91719..262a6e42 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -71,4 +71,4 @@ jobs: - name: PHPUnit working-directory: apps/${{ env.APP_NAME }} - run: composer run text:unit + run: composer run test:unit diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 56c32ade..f7f3f436 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -38,7 +38,7 @@ jobs: # do not stop on another job's failure fail-fast: false matrix: - ocp-version: [ '^28', 'dev-master' ] + ocp-version: [ 'dev-master' ] php-version: [ '8.0', '8.1', '8.2', '8.3' ] @@ -63,7 +63,7 @@ jobs: run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} --ignore-platform-reqs --with-dependencies - name: Install dependencies - run: composer require --dev + run: composer require --dev - name: Run coding standards check run: composer run psalm diff --git a/composer.json b/composer.json index 9a1287f5..27d5da7c 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,8 @@ "cs:fix": "php-cs-fixer fix", "test:unit": "phpunit --config tests/phpunit.xml", "psalm": "psalm.phar --no-cache", + "psalm:update-baseline": "psalm.phar --threads=1 --update-baseline", + "psalm:update-baseline:force": "psalm.phar --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml", "post-install-cmd": [ "@composer bin all install --ansi", "composer dump-autoload" diff --git a/psalm.xml b/psalm.xml index 47636423..6c93f6ce 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,5 +1,6 @@ + diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml new file mode 100644 index 00000000..027fcf4d --- /dev/null +++ b/tests/psalm-baseline.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +