Skip to content

Commit

Permalink
Makes the Windows tests only run on the release PR (#6380)
Browse files Browse the repository at this point in the history
* format

* ci

* exclude logic

* add changeset

* test

* delete changeset

* tweaks

* remove edited

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
abidlabs and gradio-pr-bot authored Nov 11, 2023
1 parent 200237d commit c55f927
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- "main"
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]

concurrency:
group: backend-${{ github.ref }}-${{ github.event_name == 'push' || github.event.inputs.fire != null }}
Expand Down Expand Up @@ -51,6 +52,8 @@ jobs:
os: ["ubuntu-latest", "windows-latest"]
test-type: ["not flaky", "flaky"]
python-version: ["3.8"]
exclude:
- os: ${{ github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'windows-tests') && 'dummy' || 'windows-latest' }}
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
Expand Down Expand Up @@ -143,6 +146,8 @@ jobs:
os: ["ubuntu-latest", "windows-latest"]
test-type: ["not flaky", "flaky"]
python-version: ["3.8"]
exclude:
- os: ${{ github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'windows-tests') && 'dummy' || 'windows-latest' }}
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
pull_request:
branches:
- main
- v4

jobs:
comment-spaces-start:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- main
- v4

env:
CI: true
Expand Down Expand Up @@ -45,6 +44,12 @@ jobs:
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"
env:
PR_NUMBER: ${{ steps.changesets.outputs.pullRequestNumber }}
GITHUB_TOKEN: ${{ secrets.GRADIO_PAT }}
- name: publish to pypi
if: steps.changesets.outputs.hasChangesets != 'true'
uses: "gradio-app/github/actions/publish-pypi@main"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/trigger-changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
types: [opened, synchronize, reopened, edited, labeled, unlabeled]
branches:
- main
- v4
issue_comment:
types: [edited]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: deploy json to aws
if: steps.pr_details.outputs.source_branch == 'changeset-release/main' || steps.pr_details.outputs.source_branch == 'changeset-release/v4'
if: steps.pr_details.outputs.source_branch == 'changeset-release/main'
run: |
export AWS_ACCESS_KEY_ID=${{ secrets.AWSACCESSKEYID }}
export AWS_SECRET_ACCESS_KEY=${{ secrets.AWSSECRETKEY }}
Expand Down

0 comments on commit c55f927

Please sign in to comment.