python.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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.4 not available
  17. - 3.5
  18. - 3.6
  19. - 3.7
  20. - 3.8
  21. steps:
  22. - uses: actions/checkout@v1
  23. - uses: actions/setup-python@v1
  24. with:
  25. python-version: ${{ matrix.python-version }}
  26. - run: pip install --upgrade pipenv>=2018.10.9
  27. - run: pipenv install --python "$PYTHON_VERSION" --deploy --dev
  28. env:
  29. PYTHON_VERSION: ${{ matrix.python-version }}
  30. - run: if python3 -c 'import sys; sys.exit(sys.version_info < (3, 8))'; then
  31. pipenv install 'astroid>=2.3.0';
  32. fi
  33. - run: pipenv graph
  34. - run: pipenv run pytest --cov=free_disk --cov-report=term-missing
  35. - run: pipenv run pylint free_disk
  36. - run: pipenv run pylint --disable=missing-requirement tests/*