Skip to content
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

run download tests on a daily schedule #2675

Merged
merged 10 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/failed_schedule_issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Scheduled workflow {{ env.WORKFLOW }}/{{ env.JOB }} failed
labels: bug, module: datasets
---

Oh no, something went wrong in the scheduled workflow {{ env.WORKFLOW }}/{{ env.JOB }}.
Please look into it:

https://github.com/{{ env.REPO }}/actions/runs/{{ env.ID }}

Feel free to close this if this was just a one-off error.
46 changes: 46 additions & 0 deletions .github/workflows/tests-schedule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: tests

on:
pull_request:
- "test/test_datasets_download.py"
- ".github/failed_schedule_issue_template.md"
- ".github/workflows/tests-schedule.yml"

schedule:
- cron: "0 9 * * *"

jobs:
download:
runs-on: ubuntu-latest

steps:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.6

- name: Upgrade pip
run: python -m pip install --upgrade pip

- 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

- name: Run tests
run: pytest test/test_datasets_download.py

- uses: JasonEtco/[email protected]
name: Create issue if download tests failed
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
WORKFLOW: ${{ github.workflow }}
JOB: ${{ github.job }}
ID: ${{ github.run_id }}
with:
filename: .github/failed_schedule_issue_template.md