Python_tests.yml 963 B

12345678910111213141516171819202122232425262728293031
  1. # TODO: Enable os: windows-latest
  2. # TODO: Enable python-version: 3.5
  3. # TODO: Enable pytest --doctest-modules
  4. name: Python_tests
  5. on: [push, pull_request]
  6. jobs:
  7. Python_tests:
  8. runs-on: ${{ matrix.os }}
  9. strategy:
  10. fail-fast: false
  11. max-parallel: 15
  12. matrix:
  13. os: [macos-latest, ubuntu-latest] # , windows-latest]
  14. python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
  15. steps:
  16. - uses: actions/checkout@v2
  17. - name: Set up Python ${{ matrix.python-version }}
  18. uses: actions/setup-python@v2
  19. with:
  20. python-version: ${{ matrix.python-version }}
  21. - name: Install dependencies
  22. run: |
  23. python -m pip install --upgrade pip
  24. pip install -r requirements_dev.txt
  25. - name: Lint with flake8
  26. run: flake8 . --count --show-source --statistics
  27. - name: Test with pytest
  28. run: pytest
  29. # - name: Run doctests with pytest
  30. # run: pytest --doctest-modules