Skip to content

Commit 1871a69

Browse files
authored
fix: run tests from a pr workflow. (#9696)
* fix: run tests from a pr workflow. * correct * update * checking.
1 parent e3bc4aa commit 1871a69

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/run_tests_from_a_pr.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
default: 'diffusers/diffusers-pytorch-cuda'
88
description: 'Name of the Docker image'
99
required: true
10-
branch:
11-
description: 'PR Branch to test on'
10+
pr_number:
11+
description: 'PR number to test on'
1212
required: true
1313
test:
1414
description: 'Tests to run (e.g.: `tests/models`).'
@@ -43,8 +43,8 @@ jobs:
4343
exit 1
4444
fi
4545
46-
if [[ ! "$PY_TEST" =~ ^tests/(models|pipelines) ]]; then
47-
echo "Error: The input string must contain either 'models' or 'pipelines' after 'tests/'."
46+
if [[ ! "$PY_TEST" =~ ^tests/(models|pipelines|lora) ]]; then
47+
echo "Error: The input string must contain either 'models', 'pipelines', or 'lora' after 'tests/'."
4848
exit 1
4949
fi
5050
@@ -53,13 +53,13 @@ jobs:
5353
exit 1
5454
fi
5555
echo "$PY_TEST"
56+
57+
shell: bash -e {0}
5658

5759
- name: Checkout PR branch
5860
uses: actions/checkout@v4
5961
with:
60-
ref: ${{ github.event.inputs.branch }}
61-
repository: ${{ github.event.pull_request.head.repo.full_name }}
62-
62+
ref: refs/pull/${{ inputs.pr_number }}/head
6363

6464
- name: Install pytest
6565
run: |

0 commit comments

Comments
 (0)