Makes the Windows tests only run on the release PR (#6380)

* 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>
This commit is contained in:
Abubakar Abid 2023-11-11 15:10:03 -08:00 committed by GitHub
parent 200237d73c
commit c55f927f5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 4 deletions

View File

@ -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 }}
@ -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:
@ -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:

View File

@ -5,7 +5,6 @@ on:
pull_request:
branches:
- main
- v4
jobs:
comment-spaces-start:

View File

@ -3,7 +3,6 @@ on:
push:
branches:
- main
- v4
env:
CI: true
@ -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"

View File

@ -4,7 +4,6 @@ on:
types: [opened, synchronize, reopened, edited, labeled, unlabeled]
branches:
- main
- v4
issue_comment:
types: [edited]

View File

@ -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 }}