diff --git a/.github/workflows/occ-command-documentation.yml b/.github/workflows/occ-command-documentation.yml new file mode 100644 index 000000000..b6e653191 --- /dev/null +++ b/.github/workflows/occ-command-documentation.yml @@ -0,0 +1,92 @@ +name: Documentation + +on: + pull_request: + paths: + - '.github/workflows/**' + - 'appinfo/**' + - 'lib/**' + - 'templates/**' + - 'tests/**' + - 'vendor/**' + - 'vendor-bin/**' + - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + + push: + branches: + - main + - master + - stable* + +permissions: + contents: read + +concurrency: + group: occ-commands-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + occ-commands: + runs-on: ubuntu-latest + + strategy: + matrix: + php-versions: ['8.0', '8.1'] + server-versions: ['master'] + + steps: + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Checkout server + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + with: + submodules: true + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout app + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + with: + path: apps/${{ env.APP_NAME }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite + coverage: none + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Check composer file existence + id: check_composer + uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 + with: + files: apps/${{ env.APP_NAME }}/composer.json + + - name: Set up dependencies + # Only run if phpunit config file exists + if: steps.check_composer.outputs.files_exists == 'true' + working-directory: apps/${{ env.APP_NAME }} + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 4444 + run: | + mkdir data + ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password + ./occ app:enable --force ${{ env.APP_NAME }} + ./occ config:system:set debug --value true --type boolean + + - name: Check if documentation is up to date + id: check_documentation + run: | + ./occ talk:developer:update-docs + cd apps/${{ env.APP_NAME }} + bash -c "[[ ! \"`git status --porcelain `\" ]] || (cat docs/occ.md && echo 'Documentation outdated. Run the command talk:developer:update-docs locally, commit the occ.md file and push the changes.' && exit 1)" diff --git a/appinfo/info.xml b/appinfo/info.xml index 3bbb67d48..c6125480b 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -85,6 +85,7 @@ And in the works for the [coming versions](https://github.com/nextcloud/spreed/m OCA\Talk\Command\Command\Delete OCA\Talk\Command\Command\ListCommand OCA\Talk\Command\Command\Update + OCA\Talk\Command\Developer\UpdateDocs OCA\Talk\Command\Monitor\Calls OCA\Talk\Command\Monitor\HasActiveCalls OCA\Talk\Command\Monitor\Room diff --git a/docs/TURN.md b/docs/TURN.md index 01b0e9b27..1bb474633 100644 --- a/docs/TURN.md +++ b/docs/TURN.md @@ -1,3 +1,5 @@ +# CoTURN configuration + ### Background The configuration of Nextcloud Talk mainly depends on your desired usage: diff --git a/docs/capabilities.md b/docs/capabilities.md index a84002871..1c1b52221 100644 --- a/docs/capabilities.md +++ b/docs/capabilities.md @@ -1,6 +1,4 @@ ---- -title: Capabilities ---- +# Capabilities ## 3.0 (Initial Talk release) * `audio` - audio is supported diff --git a/docs/constants.md b/docs/constants.md index e30c13b00..340eba1f9 100644 --- a/docs/constants.md +++ b/docs/constants.md @@ -1,6 +1,4 @@ ---- -title: Constants ---- +# Constants ## Conversation diff --git a/docs/index.md b/docs/index.md index 4312cfb3f..bd433aa59 100644 --- a/docs/index.md +++ b/docs/index.md @@ -32,3 +32,4 @@ ## Other * [Chat commands](commands.md) +* [Occ commands](occ.md) diff --git a/docs/occ.md b/docs/occ.md new file mode 100644 index 000000000..cbd820e15 --- /dev/null +++ b/docs/occ.md @@ -0,0 +1,380 @@ +# Talk occ commands + +## talk:command:add + +Add a new command + +### Usage + +* `talk:command:add