Skip to content

Commit

Permalink
Merge pull request #65 from nextcloud/ci
Browse files Browse the repository at this point in the history
Add psalm and php-cs-fixer
  • Loading branch information
juliusknorr authored May 4, 2022
2 parents 3b5ced9 + 3ba2c66 commit 0305db5
Show file tree
Hide file tree
Showing 43 changed files with 834 additions and 209 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Lint

on:
pull_request:
push:
branches:
- master
- stable*

jobs:
php:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1']

name: php${{ matrix.php-versions }} lint
steps:
- uses: actions/checkout@v3
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@2.18.1
with:
php-version: ${{ matrix.php-versions }}
coverage: none
- name: Lint
run: composer run lint

php-cs-fixer:
name: php-cs check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up php
uses: shivammathur/setup-php@2.18.1
with:
php-version: 7.4
coverage: none
- name: Install dependencies
run: composer i
- name: Run coding standards check
run: composer run cs:check
31 changes: 31 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Static analysis

on:
pull_request:
push:
branches:
- master
- stable*

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@v3
- name: Set up php
uses: shivammathur/setup-php@2.18.1
with:
php-version: 7.4
tools: composer:v1
coverage: none
- 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 appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);


/**
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"require-dev": {
"phpunit/phpunit": "^9.5",
"nextcloud/coding-standard": "^1.0",
"psalm/phar": "^4.22"
"psalm/phar": "^4.22",
"christophwurst/nextcloud": "dev-stable24",
"sabre/dav": "^4.3"
},
"config": {
"platform": {
Expand Down
Loading

0 comments on commit 0305db5

Please sign in to comment.