]> source.dussan.org Git - nextcloud-server.git/commitdiff
Lint on github actions 19384/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Sun, 9 Feb 2020 17:13:30 +0000 (18:13 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Mon, 10 Feb 2020 08:32:45 +0000 (09:32 +0100)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
.drone.yml
.github/workflows/lint.yml [new file with mode: 0644]
composer.json

index da52a049f98aa28d431748608c20a4b50f8b95c1..3da6717896cef41687cead8aa5f99940949ffcd9 100644 (file)
@@ -60,30 +60,15 @@ trigger:
     - pull_request
     - push
 
----
-kind: pipeline
-name: syntax-and-phan
-
-steps:
-- name: submodules
-  image: docker:git
-  commands:
-    - git submodule update --init
-- name: syntax-php7.2
-  image: nextcloudci/php7.2:php7.2-13
-  commands:
-    - composer install
-    - ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php --exclude 3rdparty/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php .
-- name: syntax-php7.3
-  image: nextcloudci/php7.3:php7.3-4
-  commands:
-    - composer install
-    - ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php --exclude 3rdparty/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php .
-- name: syntax-php7.4
-  image: nextcloudci/php7.4:2
-  commands:
-    - composer install
-    - ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php --exclude 3rdparty/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php .
+#---
+#kind: pipeline
+#name: syntax-and-phan
+#
+#steps:
+#- name: submodules
+#  image: docker:git
+#  commands:
+#    - git submodule update --init
 #- name: phan
 #  image: nextcloudci/php7.2:php7.2-13
 #  commands:
@@ -91,14 +76,14 @@ steps:
 #    - composer require --dev "phan/phan:0.11.1"
 #    - ./lib/composer/phan/phan/phan -k build/.phan/config.php
 #    - php ./build/.phan/plugin-checker.php
-
-trigger:
-  branch:
-    - master
-    - stable*
-  event:
-    - pull_request
-    - push
+#
+#trigger:
+#  branch:
+#    - master
+#    - stable*
+#  event:
+#    - pull_request
+#    - push
 
 ---
 kind: pipeline
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644 (file)
index 0000000..ca02767
--- /dev/null
@@ -0,0 +1,20 @@
+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
index e3ec84c80e1e22dcee92cc84a85b8649d061f032..5f3db01b32c9725c0d2ae6350395bd665914d711 100644 (file)
@@ -16,5 +16,8 @@
     "require-dev": {
         "jakub-onderka/php-parallel-lint": "^0.9.2",
         "jakub-onderka/php-console-highlighter": "^0.3.2"
-    }
+    },
+  "scripts": {
+    "lint": "find . -name \\*.php -not -path './lib/composer/*' -exec php -l \"{}\" \\;"
+  }
 }