Updating lint-php.yml workflow from template

Signed-off-by: Nextcloud bot <bot@nextcloud.com>
This commit is contained in:
Nextcloud bot 2022-10-15 09:57:35 +00:00
parent 9d4c591f1a
commit 8450d7d9a5

View file

@ -1,48 +1,57 @@
# This workflow is provided via the organization template repository # This workflow is provided via the organization template repository
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
name: Lint name: Lint
on: on:
pull_request: pull_request:
push: push:
branches: branches:
- main - main
- master - master
- stable* - stable*
jobs: permissions:
php-lint: contents: read
runs-on: ubuntu-latest
strategy: concurrency:
matrix: group: lint-php-${{ github.head_ref || github.run_id }}
php-versions: ["8.0"] cancel-in-progress: true
name: php-lint jobs:
php-lint:
steps: runs-on: ubuntu-latest
- name: Checkout strategy:
uses: actions/checkout@v3 matrix:
php-versions: ["7.4", "8.0", "8.1"]
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2 name: php-lint
with:
php-version: ${{ matrix.php-versions }} steps:
coverage: none - name: Checkout
uses: actions/checkout@v3
- name: Lint
run: cd php && composer run lint - name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
summary: with:
runs-on: ubuntu-latest php-version: ${{ matrix.php-versions }}
needs: php-lint coverage: none
if: always() - name: Lint
run: composer run lint
name: php-lint-summary
summary:
steps: permissions:
- name: Summary status contents: none
run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi runs-on: ubuntu-latest
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