diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2020-01-27 11:15:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-27 11:15:57 +0300 |
commit | 8fa5c276549456b9cafefec537220d686bbb71b8 (patch) | |
tree | c8ddee6c3a9d841689ceea3642bb410d7960e87d | |
parent | 0b11f7984d65787903e520db23076c2961141f8e (diff) | |
parent | ea1d88b5f786dcd0013e0501af4a99b4520c71f2 (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.yml | 36 | ||||
-rw-r--r-- | composer.json | 14 |
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 \"{}\" \\;" + } +} |