Skip to content

Commit

Permalink
Merge pull request #83 from nextcloud/backport/81/stable22
Browse files Browse the repository at this point in the history
[stable22] Bye travis
  • Loading branch information
nickvergessen authored Jun 24, 2021
2 parents e378588 + 4e5e442 commit 35f28e6
Show file tree
Hide file tree
Showing 17 changed files with 4,893 additions and 113 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
19 changes: 19 additions & 0 deletions .github/workflows/dependabot-approve-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Dependabot
on: pull_request

jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
# Default github action approve
- uses: hmarr/[email protected]
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

# Nextcloud bot approve and merge request
- uses: ahmadnassri/action-dependabot-auto-merge@v1
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
target: patch
github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}
71 changes: 71 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Lint

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

jobs:
php:
runs-on: ubuntu-latest

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

name: php${{ matrix.php-versions }}
steps:
- uses: actions/checkout@v2

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php-versions }}
coverage: none

- name: Lint
run: composer run lint

php-cs-fixer:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.4']

name: cs php${{ matrix.php-versions }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up php
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
coverage: none

- name: Install dependencies
run: composer i

- name: Run coding standards check
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

xml-linters:
runs-on: ubuntu-latest

name: info.xml lint
steps:
- name: Checkout
uses: actions/checkout@master

- name: Download schema
run: wget https://raw.githubusercontent.com/nextcloud/server/master/resources/app-info-shipped.xsd

- name: Lint info.xml
uses: ChristophWurst/xmllint-action@v1
with:
xml-file: ./appinfo/info.xml
xml-schema-file: ./app-info-shipped.xsd

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: Static analysis

on: [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
- 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,7 @@ nbproject
/.buildpath

# Tests - auto-generated files
/.php_cs.cache
/tests/coverage*
/tests/clover.xml
/vendor
17 changes: 17 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

require_once './vendor/autoload.php';

use Nextcloud\CodingStandard\Config;

$config = new Config();
$config
->getFinder()
->notPath('build')
->notPath('l10n')
->notPath('src')
->notPath('vendor')
->in(__DIR__);
return $config;
13 changes: 0 additions & 13 deletions .scrutinizer.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .travis.yml

This file was deleted.

6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Nextcloud announcements

Nextcloud announcements brings the latest news of Nextcloud into your notifications

## QA metrics on master branch:

[![Build Status](https://travis-ci.org/nextcloud/nextcloud_announcements.svg?branch=master)](https://travis-ci.org/nextcloud/nextcloud_announcements)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nextcloud/nextcloud_announcements/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nextcloud/nextcloud_announcements/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/nextcloud/nextcloud_announcements/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/nextcloud/nextcloud_announcements/?branch=master)
35 changes: 35 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"autoload-dev": {
"psr-4": {
"OCP\\": "vendor/christophwurst/nextcloud/OCP",
"OCA\\Notifications\\": "lib/"
}
},
"name": "nextcloud/notifications",
"description": "notifications",
"license": "AGPL",
"require": {
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"nextcloud/coding-standard": "^0.5.0",
"christophwurst/nextcloud": "dev-master@dev",
"vimeo/psalm": "^4.3.2"
},
"config": {
"optimize-autoloader": true,
"classmap-authoritative": true,
"platform": {
"php": "7.3"
}
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"psalm": "psalm --threads=1",
"psalm:update-baseline": "psalm --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType"
}
}
Loading

0 comments on commit 35f28e6

Please sign in to comment.