Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2020-01-27 11:15:57 +0300
committerGitHub <noreply@github.com>2020-01-27 11:15:57 +0300
commit8fa5c276549456b9cafefec537220d686bbb71b8 (patch)
treec8ddee6c3a9d841689ceea3642bb410d7960e87d
parent0b11f7984d65787903e520db23076c2961141f8e (diff)
parentea1d88b5f786dcd0013e0501af4a99b4520c71f2 (diff)
Merge pull request #555 from nextcloud/backport/554/stable18v18.0.1RC3v18.0.1RC2v18.0.1RC1
[stable18] Add linting via github actions
-rw-r--r--.github/workflows/lint.yml36
-rw-r--r--composer.json14
2 files changed, 50 insertions, 0 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..3e50644
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,36 @@
+name: Lint
+on: pull_request
+
+jobs:
+ php-linters:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-versions: ['7.2', '7.3', 7.4]
+ 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: Lint
+ run: composer run lint
+
+ node-linters:
+ runs-on: ubuntu-latest
+ name: ESLint
+ steps:
+ - uses: actions/checkout@master
+ - name: Set up Node
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+ - name: npm install
+ run: npm ci
+ - name: eslint
+ run: npm run lint
+ env:
+ CI: true
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..65209c0
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,14 @@
+{
+ "name": "nextcloud/notifications",
+ "description": "notifications",
+ "license": "AGPL",
+ "config": {
+ "optimize-autoloader": true,
+ "classmap-authoritative": true
+ },
+ "require": {
+ },
+ "scripts": {
+ "lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
+ }
+}