summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2021-07-06 12:01:52 +0200
committerGitHub <noreply@github.com>2021-07-06 12:01:52 +0200
commit4efac51ded14cf907e2827264cc861f7f373d1a3 (patch)
treea179d22c21e5a9f2fcfd8030a92b5eca6ca94889
parent62d5a017141dbe590e0ae96fb1b7304bb29e556f (diff)
Create lint-php-cs.yml
-rw-r--r--.github/workflows/lint-php-cs.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml
new file mode 100644
index 00000000..42ac3bec
--- /dev/null
+++ b/.github/workflows/lint-php-cs.yml
@@ -0,0 +1,38 @@
+# This workflow is provided via the organization template repository
+#
+# https://github.com/nextcloud/.github
+# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
+
+name: Lint
+
+on:
+ pull_request:
+ push:
+ branches:
+ - master
+ - stable*
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-versions: ["7.4"]
+
+ name: php-cs
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Set up php ${{ matrix.php-versions }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ coverage: none
+
+ - name: Install dependencies
+ run: composer i
+
+ - name: Lint
+ run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )