-
Notifications
You must be signed in to change notification settings - Fork 326
ci: run PHP test only if something related changed #8822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5a6584a
56d705f
c36ca73
32b8748
397f09a
7d60903
6d30dad
4e84cde
dec85dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors | ||
| # SPDX-License-Identifier: MIT | ||
| backend: | ||
| - '.github/workflows/**' | ||
| - 'appinfo/**' | ||
| - 'lib/**' | ||
| - 'templates/**' | ||
| - 'tests/php/**' | ||
| - 'vendor/**' | ||
| - 'vendor-bin/**' | ||
| - 'composer/**' | ||
| - 'composer.json' | ||
| - 'composer.lock' | ||
| - 'phpunit.integration.xml' | ||
| - 'phpunit.unit' | ||
| - '.php-cs-fixer.dist.php' | ||
| - 'psalm.xml' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,8 +18,29 @@ concurrency: | |
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| changes: | ||
| runs-on: ubuntu-latest-low | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| outputs: | ||
| backend: ${{ steps.changes.outputs.backend }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| fetch-depth: 1 | ||
| sparse-checkout: .github/changes-filters.yml | ||
| sparse-checkout-cone-mode: false | ||
| - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 | ||
| id: changes | ||
| continue-on-error: true | ||
| with: | ||
| filters: .github/changes-filters.yml | ||
|
|
||
| lint: | ||
| runs-on: ubuntu-latest | ||
| needs: changes | ||
| if: needs.changes.outputs.backend != 'false' | ||
|
|
||
| name: php-cs | ||
|
|
||
|
|
@@ -50,3 +71,17 @@ jobs: | |
|
|
||
| - name: Lint | ||
| run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) | ||
|
|
||
| summary: | ||
| permissions: | ||
| contents: none | ||
| runs-on: ubuntu-latest-low | ||
| needs: lint | ||
|
|
||
| if: always() | ||
|
|
||
| name: php-cs-lint-summary | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding this job, we will need to change the required jobs that gate merges. From lint-php-cs/lint to lint-php-cs/summary
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need a different job gate? Your test Ci ran correctly
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #8823 did not open a PR to |
||
|
|
||
| steps: | ||
| - name: Summary status | ||
| run: if ${{ needs.lint.result != 'success' && needs.lint.result != 'skipped' }}; then exit 1; fi | ||
Uh oh!
There was an error while loading. Please reload this page.