fix node25 #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: quality-gate | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| permissions: | |
| contents: read | |
| jobs: | |
| changed-files: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| source_changed: ${{ steps.source.outputs.diff != '' }} | |
| tests_changed: ${{ steps.tests.outputs.diff != '' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: technote-space/get-diff-action@v6 | |
| id: source | |
| with: | |
| PATTERNS: | | |
| **/*.ts | |
| **/*.tsx | |
| **/*.js | |
| **/*.jsx | |
| **/*.mjs | |
| **/*.go | |
| **/*.rs | |
| **/*.py | |
| **/*.sh | |
| EXCLUDE_PATTERNS: | | |
| **/*.test.* | |
| **/*.spec.* | |
| .github/** | |
| - uses: technote-space/get-diff-action@v6 | |
| id: tests | |
| with: | |
| PATTERNS: | | |
| **/*.test.* | |
| **/*.spec.* | |
| **/test/** | |
| **/tests/** | |
| EXCLUDE_PATTERNS: | | |
| .github/** | |
| enforce-test-delta: | |
| needs: changed-files | |
| if: needs.changed-files.outputs.source_changed == 'true' && needs.changed-files.outputs.tests_changed != 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Require test updates when source changes | |
| run: | | |
| echo "::error::Source files changed without accompanying test changes." | |
| exit 1 |