2023-01-26 20:51:02 +03:00
|
|
|
# This workflow is provided via the organization template repository
|
|
|
|
#
|
|
|
|
# https://github.com/nextcloud/.github
|
|
|
|
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
|
|
|
|
2023-05-28 15:00:37 +03:00
|
|
|
name: Lint php-cs
|
2023-01-26 20:51:02 +03:00
|
|
|
|
|
|
|
on: pull_request
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: lint-php-cs-${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
name: php-cs
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-12-26 13:31:58 +03:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
2023-01-26 20:51:02 +03:00
|
|
|
|
2023-12-26 13:31:58 +03:00
|
|
|
- name: Set up php8.2
|
2024-02-05 19:28:21 +03:00
|
|
|
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
|
2023-01-26 20:51:02 +03:00
|
|
|
with:
|
2023-12-26 13:31:58 +03:00
|
|
|
php-version: 8.2
|
2024-02-05 19:28:21 +03:00
|
|
|
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
2023-01-26 20:51:02 +03:00
|
|
|
coverage: none
|
2023-05-28 15:00:37 +03:00
|
|
|
ini-file: development
|
2023-01-26 20:51:02 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: composer i
|
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
|