-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tests] make test steps dependent on certain things and general cleanup of the workflows #7026
Changes from all commits
651320a
2f9e026
b2606d9
a021e0f
80ee108
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "src/diffusers/**.py" | ||
push: | ||
branches: | ||
- main | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "src/diffusers/**.py" | ||
push: | ||
branches: | ||
- main | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "src/diffusers/**.py" | ||
- "tests/**.py" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
|
@@ -16,7 +19,44 @@ env: | |
PYTEST_TIMEOUT: 60 | ||
|
||
jobs: | ||
check_code_quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[quality] | ||
- name: Check quality | ||
run: | | ||
ruff check examples tests src utils scripts | ||
ruff format examples tests src utils scripts --check | ||
|
||
check_repository_consistency: | ||
needs: check_code_quality | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[quality] | ||
- name: Check quality | ||
run: | | ||
python utils/check_copies.py | ||
python utils/check_dummies.py | ||
make deps_table_check_updated | ||
|
||
run_fast_tests: | ||
needs: [check_code_quality, check_repository_consistency] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of separately running the code quality and consistency tests we run them here and make them as requirements. |
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,14 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why include paths? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So that we don't trigger this workflow for changes made to "docs" folder for example. |
||
- "src/diffusers/**.py" | ||
- "benchmarks/**.py" | ||
- "examples/**.py" | ||
- "scripts/**.py" | ||
- "tests/**.py" | ||
- ".github/**.yml" | ||
- "utils/**.py" | ||
push: | ||
branches: | ||
- ci-* | ||
|
@@ -19,7 +27,44 @@ env: | |
PYTEST_TIMEOUT: 60 | ||
|
||
jobs: | ||
check_code_quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[quality] | ||
- name: Check quality | ||
run: | | ||
ruff check examples tests src utils scripts | ||
ruff format examples tests src utils scripts --check | ||
|
||
check_repository_consistency: | ||
needs: check_code_quality | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[quality] | ||
- name: Check quality | ||
run: | | ||
python utils/check_copies.py | ||
python utils/check_dummies.py | ||
make deps_table_check_updated | ||
|
||
run_fast_tests: | ||
needs: [check_code_quality, check_repository_consistency] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -117,6 +162,7 @@ jobs: | |
path: reports | ||
|
||
run_staging_tests: | ||
needs: [check_code_quality, check_repository_consistency] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "src/diffusers/**.py" | ||
push: | ||
branches: | ||
- main | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ on: | |
push: | ||
branches: | ||
- main | ||
paths: | ||
- "src/diffusers/**.py" | ||
- "tests/**.py" | ||
|
||
env: | ||
DIFFUSERS_IS_CI: yes | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add paths here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as #7026 (comment).