python.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
  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. tests:
  12. runs-on: ubuntu-20.04
  13. strategy:
  14. matrix:
  15. python-version:
  16. - '3.6'
  17. - '3.7'
  18. - '3.8'
  19. - '3.9'
  20. - '3.10'
  21. fail-fast: false
  22. steps:
  23. - uses: actions/checkout@v2.4.0
  24. - uses: actions/setup-python@v2.3.0
  25. with:
  26. python-version: ${{ matrix.python-version }}
  27. - run: pip install --upgrade pipenv==2020.8.13
  28. # by default pipenv picks the latest version in PATH
  29. - run: pipenv install --python "$PYTHON_VERSION" --deploy --dev
  30. env:
  31. PYTHON_VERSION: ${{ matrix.python-version }}
  32. - run: pipenv graph
  33. - run: pipenv run pytest --cov="$(cat *.egg-info/top_level.txt)" --cov-report=term-missing --cov-fail-under=100
  34. - run: pipenv run pylint "$(cat *.egg-info/top_level.txt)" tests/*