python.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # sync with https://github.com/fphammerle/ical2vdir/blob/master/.github/workflows/python.yml
  2. # shown in badge
  3. # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository
  4. name: tests
  5. on:
  6. push:
  7. pull_request:
  8. schedule:
  9. - cron: '0 20 * * 5'
  10. jobs:
  11. build:
  12. runs-on: ubuntu-18.04
  13. strategy:
  14. matrix:
  15. python-version:
  16. - 3.5
  17. - 3.6
  18. - 3.7
  19. - 3.8
  20. steps:
  21. - uses: actions/checkout@v1
  22. - uses: actions/setup-python@v1
  23. with:
  24. python-version: ${{ matrix.python-version }}
  25. - run: pip install --upgrade pipenv>=2018.10.9
  26. - run: pipenv sync --dev
  27. # ModuleNotFoundError: No module named 'importlib_metadata'
  28. - run: if python3 -c 'import sys; sys.exit(sys.version_info < (3, 8))'; then
  29. pipenv graph;
  30. pipenv install --dev importlib-metadata;
  31. fi
  32. - run: pipenv graph
  33. - run: pipenv run pytest --cov=tooncher --cov-report=term-missing --cov-fail-under=63
  34. - run: pipenv run black --check .