Skip to content

Commit

Permalink
Merge pull request #19 from nc-fkl/enh/polish
Browse files Browse the repository at this point in the history
Polish
  • Loading branch information
julien-nc authored Jan 16, 2024
2 parents 4082a21 + 1e38788 commit d13ea47
Show file tree
Hide file tree
Showing 18 changed files with 225 additions and 2,253 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Psalm static analysis

on:
pull_request:
paths:
- .github/workflows/psalm.yml
- appinfo/**
- composer.*
- lib/**
- templates/**
- tests/**
push:
branches:
- main
- stable*
- test
paths:
- .github/workflows/psalm.yml
- appinfo/**
- composer.*
- lib/**
- templates/**
- tests/**

concurrency:
group: psalm-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
static-analysis:
runs-on: ubuntu-latest

name: Psalm check
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Set up php
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
with:
php-version: 8.2
coverage: none
ini-file: development
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, gd, zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: composer i

- name: Run coding standards check
run: composer run psalm
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ vendor
js/*hot-update.*
/js
build
.php-cs-fixer.cache
.php*.cache
/composer.lock
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@
"optimize-autoloader": true,
"classmap-authoritative": true,
"platform": {
"php": "7.4"
"php": "8.0"
}
},
"scripts": {
"cs:fix": "php-cs-fixer fix",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
"test:unit": "phpunit -c tests/phpunit.xml --fail-on-warning"
"test:unit": "phpunit -c tests/phpunit.xml --fail-on-warning",
"psalm": "psalm.phar --no-cache"
},
"require-dev": {
"christophwurst/nextcloud_testing": "^0.12.4",
"nextcloud/coding-standard": "^1.1",
"phpunit/phpunit": "^9"
"phpunit/phpunit": "^9",
"psalm/phar": "^5.19",
"nextcloud/ocp": "dev-master"
}
}
Loading

0 comments on commit d13ea47

Please sign in to comment.