Skip to content

Commit

Permalink
more ci
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Mar 9, 2021
1 parent f2ad73e commit b7cf6b0
Show file tree
Hide file tree
Showing 11 changed files with 2,727 additions and 5 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Php Lint
on: [push, pull_request]

jobs:
php-linters:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0']
name: php${{ matrix.php-versions }} lint
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
coverage: none
- name: Install dependencies
run: composer i
- name: Lint
run: composer run lint

php-cs-fixer:
name: php-cs check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
with:
php-version: 7.4
tools: composer:v1
coverage: none
- name: Install dependencies
run: composer i
- name: Run coding standards check
run: composer run cs:check
26 changes: 26 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Php Static analysis
on: [push, pull_request]

jobs:
static-psalm-analysis:
runs-on: ubuntu-latest
strategy:
matrix:
ocp-version: [ 'dev-master' ]
name: Nextcloud ${{ matrix.ocp-version }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up php
uses: shivammathur/setup-php@master
with:
php-version: 7.4
tools: composer:v1
coverage: none
extensions: redis
- name: Install dependencies
run: composer i
- name: Install dependencies
run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }}
- name: Run coding standards check
run: composer run psalm
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
build
node_modules
node_modules
vendor
*.cache
3 changes: 3 additions & 0 deletions .nextcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ screenshots
Makefile
screenshots
node_modules
composer.*
package.*
.php_cs*
20 changes: 20 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);

require_once './vendor/autoload.php';

use Nextcloud\CodingStandard\Config;

$config = new Config();
$config
->getFinder()
->ignoreVCSIgnored(true)
->notPath('build')
->notPath('l10n')
->notPath('lib/Vendor')
->notPath('src')
->notPath('tests/configs')
->notPath('vendor')
->in(__DIR__);
return $config;
16 changes: 16 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"require-dev": {
"roave/security-advisories": "dev-master",
"christophwurst/nextcloud": "dev-master",
"php-parallel-lint/php-parallel-lint": "^1.0.0",
"nextcloud/coding-standard": "^0.4.0",
"psalm/phar": "^4.3"
},
"license": "AGPLv3",
"scripts": {
"lint": "parallel-lint --exclude src --exclude vendor --exclude target --exclude build .",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"psalm": "psalm.phar"
}
}
Loading

0 comments on commit b7cf6b0

Please sign in to comment.