summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-04-15 13:34:01 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-04-15 13:35:51 +0200
commit9e20993c4d8b00d3b8eb19a804f543f17335b47b (patch)
tree94b574a5f9fbb0e0917185c637c6e34b024fb266 /.github
parentbe80ca5d0fc9bd77f4c7c8fd7c986d378b79cc13 (diff)
Php cs:fix
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/lint-info-xml.yml31
-rw-r--r--.github/workflows/lint-php-cs.yml36
-rw-r--r--.github/workflows/lint-php.yml48
3 files changed, 115 insertions, 0 deletions
diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml
new file mode 100644
index 00000000..cea2a2bc
--- /dev/null
+++ b/.github/workflows/lint-info-xml.yml
@@ -0,0 +1,31 @@
+# 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:
+ xml-linters:
+ runs-on: ubuntu-latest
+
+ name: info.xml lint
+ steps:
+ - name: Checkout
+ uses: actions/checkout@master
+
+ - name: Download schema
+ run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
+
+ - name: Lint info.xml
+ uses: ChristophWurst/xmllint-action@v1
+ with:
+ xml-file: ./appinfo/info.xml
+ xml-schema-file: ./info.xsd
diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml
new file mode 100644
index 00000000..049fb194
--- /dev/null
+++ b/.github/workflows/lint-php-cs.yml
@@ -0,0 +1,36 @@
+# 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:
+ - main
+ - master
+ - stable*
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+
+ name: php-cs
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Set up php ${{ matrix.php-versions }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: "7.4"
+ 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 )
diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml
new file mode 100644
index 00000000..a4abc44f
--- /dev/null
+++ b/.github/workflows/lint-php.yml
@@ -0,0 +1,48 @@
+# 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:
+ - main
+ - master
+ - stable*
+
+jobs:
+ php-lint:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-versions: ["7.4", "8.0"]
+
+ name: php-lint
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Set up php ${{ matrix.php-versions }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ coverage: none
+
+ - name: Lint
+ run: composer run lint
+
+ summary:
+ runs-on: ubuntu-latest
+ needs: php-lint
+
+ if: always()
+
+ name: php-lint-summary
+
+ steps:
+ - name: Summary status
+ run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi