summaryrefslogtreecommitdiffstats
path: root/.github/workflows/api-php-static-code-check.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/api-php-static-code-check.yml')
-rw-r--r--.github/workflows/api-php-static-code-check.yml42
1 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/api-php-static-code-check.yml b/.github/workflows/api-php-static-code-check.yml
new file mode 100644
index 000000000..0c0d4cab8
--- /dev/null
+++ b/.github/workflows/api-php-static-code-check.yml
@@ -0,0 +1,42 @@
+name: Static analysis
+on:
+ pull_request
+jobs:
+ static-psalm-analysis:
+ runs-on: ubuntu-latest
+ continue-on-error: true
+ strategy:
+ matrix:
+ php-versions: [ '7.4' ]
+ nextcloud: [ 'stable20', 'stable21' ]
+ database: [ 'sqlite' ]
+ name: "Psalm: Nextcloud ${{ matrix.nextcloud }}"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@master
+ - name: Set up php
+ uses: shivammathur/setup-php@master
+ with:
+ php-version: 7.4
+ extensions: pdo_sqlite,pdo_mysql,pdo_pgsql,gd,zip
+ coverage: none
+
+ - name: Set up server non MySQL
+ uses: SMillerDev/nextcloud-actions/setup-nextcloud@main
+ with:
+ cron: true
+ version: ${{ matrix.nextcloud }}
+ database-type: ${{ matrix.database }}
+
+ - name: Install dependencies
+ run: composer install
+
+ - name: Configure server with app
+ uses: SMillerDev/nextcloud-actions/setup-nextcloud-app@main
+ with:
+ app: 'news'
+ check-code: false
+
+ - name: Run coding standards check
+ working-directory: ../server/apps/news
+ run: ./vendor/bin/psalm \ No newline at end of file