-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix scheduled download tests (#2706)
* fix triggers for scheduled workflow * more fix * add missing repository checkout * try fix label in template * rewrite test infrastructure * trigger issue generation * try fix issue template * try remove quotes * remove buggy label * try fix title * cleanup * add more test details * reenable issue creation Co-authored-by: Francisco Massa <[email protected]>
- Loading branch information
Showing
3 changed files
with
98 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,10 @@ name: tests | |
|
||
on: | ||
pull_request: | ||
- "test/test_datasets_download.py" | ||
- ".github/failed_schedule_issue_template.md" | ||
- ".github/workflows/tests-schedule.yml" | ||
paths: | ||
- "test/test_datasets_download.py" | ||
- ".github/failed_schedule_issue_template.md" | ||
- ".github/workflows/tests-schedule.yml" | ||
|
||
schedule: | ||
- cron: "0 9 * * *" | ||
|
@@ -22,20 +23,23 @@ jobs: | |
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PyTorch from the nightlies | ||
run: | | ||
pip install numpy | ||
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html | ||
- name: Install tests requirements | ||
run: pip install pytest pytest-subtests | ||
run: pip install pytest | ||
|
||
- name: Run tests | ||
run: pytest test/test_datasets_download.py | ||
run: pytest --durations=20 -ra test/test_datasets_download.py | ||
|
||
- uses: JasonEtco/[email protected] | ||
name: Create issue if download tests failed | ||
if: failure() | ||
if: failure() && github.event_name == 'schedule' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
REPO: ${{ github.repository }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters