python.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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.7'
  17. - '3.8'
  18. - '3.9'
  19. - '3.10'
  20. fail-fast: false
  21. steps:
  22. - uses: actions/checkout@v3
  23. - uses: actions/setup-python@v4
  24. with:
  25. python-version: ${{ matrix.python-version }}
  26. - run: pip install --upgrade pipenv==2020.8.13
  27. # by default pipenv picks the latest version in PATH
  28. - run: pipenv install --python "$PYTHON_VERSION" --deploy --dev
  29. env:
  30. PYTHON_VERSION: ${{ matrix.python-version }}
  31. - run: pipenv graph
  32. - run: pipenv run pytest --cov="$(cat *.egg-info/top_level.txt)" --cov-report=term-missing --cov-fail-under=100
  33. - run: pipenv run pylint "$(cat *.egg-info/top_level.txt)" tests/*