Python_tests.yml 976 B

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