2023-10-14 09:40:50 +00:00
|
|
|
---
|
|
|
|
name: static analysis
|
2023-10-14 09:13:34 +00:00
|
|
|
on:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
jobs:
|
2023-10-14 09:40:50 +00:00
|
|
|
php-cs-fixer:
|
2023-10-14 20:15:42 +00:00
|
|
|
name: PHP-CS-Fixer
|
2023-10-14 09:13:34 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-10-14 09:40:50 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: PHP-CS-Fixer
|
|
|
|
uses: docker://oskarstark/php-cs-fixer-ga
|
|
|
|
with:
|
|
|
|
args: --dry-run --diff lib
|
2023-10-14 09:13:34 +00:00
|
|
|
|
2023-10-14 09:40:50 +00:00
|
|
|
pslam:
|
|
|
|
name: Psalm
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-14 09:13:34 +00:00
|
|
|
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
|
|
|
|
|
2023-10-14 09:40:50 +00:00
|
|
|
- name: Run Psalm
|
2023-10-14 09:13:34 +00:00
|
|
|
run: |
|
|
|
|
cd apps/memories
|
|
|
|
make install-tools
|
2023-10-14 19:40:58 +00:00
|
|
|
vendor/bin/psalm --no-cache --shepherd --stats --threads=4 lib
|
2023-10-14 19:50:28 +00:00
|
|
|
|
|
|
|
prettier:
|
2023-10-14 20:15:42 +00:00
|
|
|
name: Prettier
|
2023-10-14 19:50:28 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout the app
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install Pretter
|
2023-10-14 20:06:36 +00:00
|
|
|
run: npm install --no-save "prettier@$(cat ./package.json | jq -r '.devDependencies["prettier"]')"
|
2023-10-14 19:50:28 +00:00
|
|
|
|
|
|
|
- name: Run Prettier
|
|
|
|
run: npx prettier src --check
|