summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2021-02-17 17:26:34 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-02-20 14:07:50 +0100
commit30ce6196b8979fbc00b0a12f29050239f9659c1d (patch)
tree1b05d03abf253e067d85a192e30eb23d9387075f /.github
parent4a107b3d53c4fe651ac704251b99e04a53cd587f (diff)
Add phpstan plugins
remove leftovers from psalm move phpstan and phpcs to static code check Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/api-php-static-code-check.yml51
-rw-r--r--.github/workflows/api-php-tests.yml6
2 files changed, 51 insertions, 6 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..cefac1657
--- /dev/null
+++ b/.github/workflows/api-php-static-code-check.yml
@@ -0,0 +1,51 @@
+name: Static analysis
+on:
+ pull_request
+jobs:
+ static-phpstan-analysis:
+ runs-on: ubuntu-latest
+ continue-on-error: true
+ strategy:
+ matrix:
+ php-versions: [ '7.4' ]
+ nextcloud: [ 'stable21' ]
+ database: [ 'sqlite' ]
+ name: "phpstan: 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: Build app
+ run: make
+
+ - name: Configure server with app
+ uses: SMillerDev/nextcloud-actions/setup-nextcloud-app@main
+ with:
+ app: 'news'
+ check-code: true
+ force: true
+
+ - name: Prep code scanning
+ working-directory: ../server/apps/news
+ run: make php-test-dependencies
+
+ - name: PHPCS
+ working-directory: ../server/apps/news
+ run: pwd && make phpcs #debug pwd
+
+ - name: PHPStan
+ working-directory: ../server/apps/news
+ run: make phpstan \ No newline at end of file
diff --git a/.github/workflows/api-php-tests.yml b/.github/workflows/api-php-tests.yml
index fa4d4a9dd..2a152480b 100644
--- a/.github/workflows/api-php-tests.yml
+++ b/.github/workflows/api-php-tests.yml
@@ -47,12 +47,6 @@ jobs:
- name: Prep PHP tests
working-directory: ../server/apps/news
run: make php-test-dependencies
- - name: PHPCS
- working-directory: ../server/apps/news
- run: make phpcs
- - name: PHPStan
- working-directory: ../server/apps/news
- run: make phpstan
- name: Unittests
working-directory: ../server/apps/news
run: make unit-test