memories/.github/workflows/static-analysis.yaml

60 lines
1.4 KiB
YAML
Raw Normal View History

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