"vscode:/vscode.git/clone" did not exist on "bef993076ea1369aea8f58469f15523d4cda97ba"
Unverified Commit 1871a69e authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

fix: run tests from a pr workflow. (#9696)

* fix: run tests from a pr workflow.

* correct

* update

* checking.
parent e3bc4aab
...@@ -7,8 +7,8 @@ on: ...@@ -7,8 +7,8 @@ on:
default: 'diffusers/diffusers-pytorch-cuda' default: 'diffusers/diffusers-pytorch-cuda'
description: 'Name of the Docker image' description: 'Name of the Docker image'
required: true required: true
branch: pr_number:
description: 'PR Branch to test on' description: 'PR number to test on'
required: true required: true
test: test:
description: 'Tests to run (e.g.: `tests/models`).' description: 'Tests to run (e.g.: `tests/models`).'
...@@ -43,8 +43,8 @@ jobs: ...@@ -43,8 +43,8 @@ jobs:
exit 1 exit 1
fi fi
if [[ ! "$PY_TEST" =~ ^tests/(models|pipelines) ]]; then if [[ ! "$PY_TEST" =~ ^tests/(models|pipelines|lora) ]]; then
echo "Error: The input string must contain either 'models' or 'pipelines' after 'tests/'." echo "Error: The input string must contain either 'models', 'pipelines', or 'lora' after 'tests/'."
exit 1 exit 1
fi fi
...@@ -54,12 +54,12 @@ jobs: ...@@ -54,12 +54,12 @@ jobs:
fi fi
echo "$PY_TEST" echo "$PY_TEST"
shell: bash -e {0}
- name: Checkout PR branch - name: Checkout PR branch
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ github.event.inputs.branch }} ref: refs/pull/${{ inputs.pr_number }}/head
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install pytest - name: Install pytest
run: | run: |
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment