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:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2022-11-08 16:26:16 +0300
committerGitHub <noreply@github.com>2022-11-08 16:26:16 +0300
commit13cdec4cd9a722b5f1874c799b9ebf4b52aa1057 (patch)
tree9187aebfd0d671212c7b9406288280b48e31d287
parent9ba20a7b80a2b394d481285fbfce0c98eb6b71df (diff)
parent53f4585d3b30ad421fa4cbfb047040820452c24c (diff)
Merge pull request #9301 from nextcloud/backport/9299/stable25
[stable25] Update CI templates and add more links
-rw-r--r--developer_manual/digging_deeper/continuous_integration.rst65
1 files changed, 16 insertions, 49 deletions
diff --git a/developer_manual/digging_deeper/continuous_integration.rst b/developer_manual/digging_deeper/continuous_integration.rst
index 9b1423f30..8ac113d02 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,18 @@ 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.
+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>`_.
-.. 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.
+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 master
+branch of Nextcloud server, as well as other currently supported stable branches. Adjust this to your needs.
.. _Psalm: https://psalm.dev/docs/