tests-schedule.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. name: tests
  2. on:
  3. pull_request:
  4. paths:
  5. - "test/test_datasets_download.py"
  6. - ".github/failed_schedule_issue_template.md"
  7. - ".github/workflows/tests-schedule.yml"
  8. schedule:
  9. - cron: "0 9 * * *"
  10. jobs:
  11. download:
  12. runs-on: ubuntu-latest
  13. steps:
  14. - name: Set up python
  15. uses: actions/setup-python@v2
  16. with:
  17. python-version: 3.8
  18. - name: Upgrade system packages
  19. run: python -m pip install --upgrade pip setuptools wheel
  20. - name: SSL
  21. run: python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
  22. - name: Checkout repository
  23. uses: actions/checkout@v2
  24. - name: Install torch nightly build
  25. run: pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
  26. - name: Install torchvision
  27. run: pip install --no-build-isolation --editable .
  28. - name: Install all optional dataset requirements
  29. run: pip install scipy pycocotools lmdb requests
  30. - name: Install tests requirements
  31. run: pip install pytest
  32. - name: Run tests
  33. run: pytest -ra -v test/test_datasets_download.py
  34. - uses: JasonEtco/create-an-issue@v2.4.0
  35. name: Create issue if download tests failed
  36. if: failure() && github.event_name == 'schedule'
  37. env:
  38. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  39. REPO: ${{ github.repository }}
  40. WORKFLOW: ${{ github.workflow }}
  41. JOB: ${{ github.job }}
  42. ID: ${{ github.run_id }}
  43. with:
  44. filename: .github/failed_schedule_issue_template.md