From 6fa74fa5d5089899690f94853fc9efe9382ca492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 30 Jan 2020 09:32:31 +0100 Subject: [PATCH] Create lint.yml --- .github/workflow/lint.yml | 36 ++++++++++++++++++++++++++++++++++++ composer.json | 12 ++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflow/lint.yml create mode 100644 composer.json diff --git a/.github/workflow/lint.yml b/.github/workflow/lint.yml new file mode 100644 index 00000000..3e50644f --- /dev/null +++ b/.github/workflow/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 00000000..0ca66095 --- /dev/null +++ b/composer.json @@ -0,0 +1,12 @@ +{ + "name": "nextcloud/tasks", + "description": "Lint config for nextcloud/tasks", + "license": "MIT", + "config": { + "optimize-autoloader": true, + "classmap-authoritative": true + }, + "scripts": { + "lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;" + } +}