mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
83 lines
2.1 KiB
YAML
83 lines
2.1 KiB
YAML
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
name: Rector
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: rector-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
changes:
|
|
runs-on: ubuntu-latest-low
|
|
|
|
outputs:
|
|
src: ${{ steps.changes.outputs.src}}
|
|
|
|
steps:
|
|
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
|
id: changes
|
|
continue-on-error: true
|
|
with:
|
|
filters: |
|
|
src:
|
|
- '.github/workflows/**'
|
|
- '3rdparty/**'
|
|
- '**/lib/**'
|
|
- '**/tests/**'
|
|
- '**/vendor-bin/**'
|
|
- '.php-cs-fixer.dist.php'
|
|
- 'composer.json'
|
|
- 'composer.lock'
|
|
- '**.php'
|
|
|
|
strict:
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
submodules: true
|
|
|
|
- name: Set up php
|
|
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f #v2.37.0
|
|
with:
|
|
php-version: '8.2'
|
|
extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,imagick,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
|
|
coverage: none
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Composer install
|
|
run: composer i
|
|
|
|
- name: Rector
|
|
run: composer run rector:strict
|
|
|
|
- name: Show changes
|
|
if: always()
|
|
run: git diff --exit-code -- . ':!lib/composer'
|
|
|
|
summary:
|
|
permissions:
|
|
contents: none
|
|
runs-on: ubuntu-latest-low
|
|
needs: [changes, strict]
|
|
|
|
if: always()
|
|
|
|
name: rector-summary
|
|
|
|
steps:
|
|
- name: Summary status
|
|
run: if ${{ needs.changes.outputs.src != 'false' && needs.strict.result != 'success' }}; then exit 1; fi
|