ci: psalm workflow

pull/877/head
Varun Patil 2023-10-14 02:13:34 -07:00
parent 3fddf35415
commit c982c35078
4 changed files with 39 additions and 2 deletions

View File

@ -1,5 +1,5 @@
---
name: Lint
name: lint
on:
- push
- pull_request

36
.github/workflows/psalm.yaml vendored 100644
View File

@ -0,0 +1,36 @@
name: pslam
on:
- push
- pull_request
jobs:
pslam:
runs-on: ubuntu-latest
steps:
- name: Checkout server
uses: actions/checkout@v3
with:
submodules: true
repository: nextcloud/server
ref: stable27
- name: Checkout the app
uses: actions/checkout@v3
with:
path: apps/memories
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: phpunit
extensions: mbstring, iconv, fileinfo, intl
coverage: none
- name: Run tests
run: |
cd apps/memories
make install-tools
make psalm

View File

@ -9,6 +9,7 @@ exiftool:
install-tools:
mkdir -p tools
composer require --dev --working-dir=tools friendsofphp/php-cs-fixer vimeo/psalm
composer install
php-lint:
tools/vendor/bin/php-cs-fixer fix lib

View File

@ -69,7 +69,7 @@ abstract class Backend
/**
* Get a cluster ID for the given cluster.
*
* @return string|int
* @return int|string
*/
abstract public static function getClusterId(array $cluster);