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

60 lines
1.4 KiB
YAML

---
name: static analysis
on:
- push
- pull_request
jobs:
php-cs-fixer:
name: PHP-CS-Fixer
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
pslam:
name: Psalm
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 Psalm
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