From a762a07be1d8ceac6e6c6751f9f56d18578ff320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 23 Jan 2020 13:41:38 +0100 Subject: [PATCH 1/3] Create lint.yml --- .github/workflows/lint.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..3e50644f2 --- /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 From 168cf861760c61034d33017f4b874fde00fdd1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 23 Jan 2020 13:42:10 +0100 Subject: [PATCH 2/3] Create composer.json --- composer.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..5df6849db --- /dev/null +++ b/composer.json @@ -0,0 +1,12 @@ +{ + "name": "nextcloud/viewer", + "description": "Lint config for nextcloud/viewer", + "license": "MIT", + "config": { + "optimize-autoloader": true, + "classmap-authoritative": true + }, + "scripts": { + "lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;" + } +} From a553934e1761f48200a58a323ff786e92ae1e49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 23 Jan 2020 13:51:36 +0100 Subject: [PATCH 3/3] Change php versions --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3e50644f2..cc8214b4a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['7.2', '7.3', 7.4] + php-versions: ['7.1', '7.2', '7.3'] name: php${{ matrix.php-versions }} lint steps: - name: Checkout