python.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.8'
  17. - '3.9'
  18. - '3.10'
  19. fail-fast: false
  20. steps:
  21. - uses: actions/checkout@v4
  22. - uses: actions/setup-python@v4
  23. with:
  24. python-version: ${{ matrix.python-version }}
  25. # with pipenv v2023.6.26:
  26. # > $ pipenv run pytest --cov="$(cat *.egg-info/top_level.txt)"
  27. # . --cov-report=term-missing --cov-fail-under=100
  28. # > cat: '*.egg-info/top_level.txt': No such file or directory
  29. # > [...]
  30. # > [...]/coverage/inorout.py:507: CoverageWarning:
  31. # . Module was never imported. (module-not-imported)
  32. - run: pip install --upgrade pipenv==2023.6.18
  33. # by default pipenv picks the latest version in PATH
  34. - run: pipenv install --python "$PYTHON_VERSION" --deploy --dev
  35. env:
  36. PYTHON_VERSION: ${{ matrix.python-version }}
  37. - run: pipenv graph
  38. - run: pipenv run pytest --cov="$(cat *.egg-info/top_level.txt)" --cov-report=term-missing --cov-fail-under=100
  39. - run: pipenv run pylint "$(cat *.egg-info/top_level.txt)" tests/*