Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/documentation.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-11-08 14:46:15 +0300
committerJoas Schilling <coding@schilljs.com>2022-11-08 14:46:15 +0300
commit696334f46a4713667a68256386c15c4f65056a22 (patch)
tree754c84a56242d91843bb500fed3570a879542f42
parent5a6c15030c8c4d39fc5e7eab77805e706590731d (diff)
Update CI templates and add more links
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--developer_manual/digging_deeper/continuous_integration.rst68
1 files changed, 18 insertions, 50 deletions
diff --git a/developer_manual/digging_deeper/continuous_integration.rst b/developer_manual/digging_deeper/continuous_integration.rst
index 9b1423f30..9e7be471b 100644
--- a/developer_manual/digging_deeper/continuous_integration.rst
+++ b/developer_manual/digging_deeper/continuous_integration.rst
@@ -21,26 +21,9 @@ Linting
info.xml
^^^^^^^^
-You can validate the ``info.xml`` :ref:`app metadata<app metadata>` file of an app with a simple github action:
-
-.. code-block:: yaml
-
- name: Lint
- on: pull_request
-
- jobs:
- xml-linters:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@master
- - name: Download schema
- run: wget https://apps.nextcloud.com/schema/apps/info.xsd
- - name: Lint info.xml
- uses: ChristophWurst/xmllint-action@v1
- with:
- xml-file: ./appinfo/info.xml
- xml-schema-file: ./info.xsd
+You can validate the ``info.xml`` :ref:`app metadata<app metadata>` file of an app with a
+`simple github action <https://github.com/nextcloud/.github/blob/master/workflow-templates/lint-info-xml.yml>`_.
+Please refer to our `nextcloud template repository <https://github.com/nextcloud/.github>`_ for an up to date template.
php
^^^
@@ -69,7 +52,10 @@ relevant github actions in our `nextcloud template repository <https://github.co
Static analysis
---------------
-`Psalm`_ is a static analysis tool that can check if your app code uses all types correctly, like if classes and methods exist. For the basic setup see the `Psalm`_ website. In order to let Psalm know about Nextcloud interfaces (the OCP namespace), you can install the `API package <https://packagist.org/packages/christophwurst/nextcloud>`_. Afterwards you'll be able to check the app with the following ``psalm.xml`` that should be put into the root of the app.
+`Psalm`_ is a static analysis tool that can check if your app code uses all types correctly, like if classes and methods exist.
+For the basic setup see the `Psalm`_ website. In order to let Psalm know about Nextcloud interfaces (the OCP namespace),
+you can install the `API package <https://packagist.org/packages/nextcloud/ocp>`_.
+Afterwards you'll be able to check the app with the following ``psalm.xml`` that should be put into the root of the app.
.. code-block:: xml
@@ -113,37 +99,19 @@ Static analysis
</issueHandlers>
</psalm>
-.. Note:: The definition suppresses usages of the global and static class ``OC`` like ``\OC::$server``, which is discouraged but still found in some apps. The doctrine supression is currently necessary as the database mappers and schema abstractions leak some of the 3rd party libraries of Nextcloud that are not known to Psalm.
+.. Note:: The definition suppresses usages of the global and static class ``OC`` like ``\OC::$server``, which is
+discouraged but still found in some apps. The doctrine suppression is currently necessary as the database mappers and
+schema abstractions leak some of the 3rd party libraries of Nextcloud that are not known to Psalm.
You can put this process into a GitHub Action that is run for every pull request.
-
-.. code-block:: yaml
-
- name: Static analysis
- on: [push]
- jobs:
- static-psalm-analysis:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- ocp-version: [ 'dev-master', 'v20.0.0' ]
- name: Nextcloud ${{ matrix.ocp-version }}
- steps:
- - name: Checkout
- uses: actions/checkout@master
- - name: Set up php
- uses: shivammathur/setup-php@master
- with:
- php-version: 7.4
- coverage: none
- - name: Install dependencies
- run: composer i
- - name: Install dependencies
- run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }}
- - name: Run coding standards check
- run: composer run psalm
-
-This creates a matrix, where the app is tested against ``dev-master``, the latest version of ``OCP`` found in the main branch of Nextcloud server, as well as ``v20.0.0``, the currently latest stable release. Adjust this to your needs.
+Check our `simple github action <https://github.com/nextcloud/.github/blob/master/workflow-templates/psalm.yml>`_ from
+our `nextcloud template repository <https://github.com/nextcloud/.github>`_.
+
+If you want to support multiple versions of Nextcloud server with a single app version, checkout this slightly
+`more complex action <https://github.com/nextcloud/.github/blob/master/workflow-templates/psalm-matrix.yml>`_.
+This creates a matrix, where the app is tested against ``dev-master``, the latest version of ``OCP`` found in the main
+branch of Nextcloud server, as well as ``dev-stable25``, ``dev-stable24`` and ``dev-stable23``, the currently supported
+stable branches. Adjust this to your needs.
.. _Psalm: https://psalm.dev/docs/