Skip to content

Chore(deps-dev): Bump friendsofphp/php-cs-fixer from 3.17.0 to 3.22.0 in /vendor-bin/csfixer #568

Chore(deps-dev): Bump friendsofphp/php-cs-fixer from 3.17.0 to 3.22.0 in /vendor-bin/csfixer

Chore(deps-dev): Bump friendsofphp/php-cs-fixer from 3.17.0 to 3.22.0 in /vendor-bin/csfixer #568

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.2']
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 ${{ 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)"