mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
# 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
|
|
#
|
|
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
name: Lint php
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'php/**'
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'php/**'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: lint-php-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
php-lint:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
php-versions: [ "8.4" ]
|
|
|
|
name: php-lint
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up php ${{ matrix.php-versions }}
|
|
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
|
|
with:
|
|
php-version: ${{ matrix.php-versions }}
|
|
coverage: none
|
|
ini-file: development
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Lint
|
|
run: cd php && composer run lint
|
|
|
|
summary:
|
|
permissions:
|
|
contents: none
|
|
runs-on: ubuntu-latest-low
|
|
needs: php-lint
|
|
|
|
if: always()
|
|
|
|
name: php-lint-summary
|
|
|
|
steps:
|
|
- name: Summary status
|
|
run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi
|