mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
Only run flaky tests if flaky-tests label is applied to PR (#7048)
* Add label * trigger ci
This commit is contained in:
parent
3f139c7c99
commit
8e5ab31d75
2
.github/workflows/backend.yml
vendored
2
.github/workflows/backend.yml
vendored
@ -55,6 +55,7 @@ jobs:
|
||||
python-version: ["3.8"]
|
||||
exclude:
|
||||
- os: ${{ github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'windows-tests') && 'dummy' || 'windows-latest' }}
|
||||
- test-type: ${{ github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'flaky-tests') && 'dummy' || 'flaky' }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
@ -149,6 +150,7 @@ jobs:
|
||||
python-version: ["3.8"]
|
||||
exclude:
|
||||
- os: ${{ github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'windows-tests') && 'dummy' || 'windows-latest' }}
|
||||
- test-type: ${{ github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'flaky-tests') && 'dummy' || 'flaky' }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
|
6
.github/workflows/publish-npm.yml
vendored
6
.github/workflows/publish-npm.yml
vendored
@ -47,6 +47,12 @@ jobs:
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.changesets.outputs.pullRequestNumber }}
|
||||
GITHUB_TOKEN: ${{ secrets.GRADIO_PAT }}
|
||||
- name: add label to run flaky tests
|
||||
if: ${{ steps.changesets.outputs.pullRequestNumber != '' && steps.changesets.outputs.pullRequestNumber != 'undefined' }}
|
||||
run: gh pr edit "$PR_NUMBER" --add-label "flaky-tests"
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.changesets.outputs.pullRequestNumber }}
|
||||
GITHUB_TOKEN: ${{ secrets.GRADIO_PAT }}
|
||||
- name: add label to run backend tests on Windows
|
||||
if: ${{ steps.changesets.outputs.pullRequestNumber != '' && steps.changesets.outputs.pullRequestNumber != 'undefined' }}
|
||||
run: gh pr edit "$PR_NUMBER" --add-label "windows-tests"
|
||||
|
Loading…
Reference in New Issue
Block a user