tests.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # TODO: Line 43, enable pytest --doctest-modules
  2. name: Tests
  3. on: [push, pull_request]
  4. jobs:
  5. Tests:
  6. strategy:
  7. fail-fast: false
  8. max-parallel: 15
  9. matrix:
  10. node: [12.x, 14.x, 16.x]
  11. python: ["3.6", "3.8", "3.10"]
  12. os: [macos-latest, ubuntu-latest, windows-latest]
  13. runs-on: ${{ matrix.os }}
  14. steps:
  15. - name: Checkout Repository
  16. uses: actions/checkout@v2
  17. - name: Use Node.js ${{ matrix.node }}
  18. uses: actions/setup-node@v2
  19. with:
  20. node-version: ${{ matrix.node }}
  21. - name: Use Python ${{ matrix.python }}
  22. uses: actions/setup-python@v2
  23. with:
  24. python-version: ${{ matrix.python }}
  25. env:
  26. PYTHON_VERSION: ${{ matrix.python }}
  27. - name: Install Dependencies
  28. run: |
  29. npm install --no-progress
  30. pip install flake8 pytest
  31. - name: Set Windows environment
  32. if: matrix.os == 'windows-latest'
  33. run: |
  34. echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
  35. echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
  36. - name: Lint Python
  37. if: matrix.os == 'ubuntu-latest'
  38. run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics
  39. - name: Run Python tests
  40. run: python -m pytest
  41. # - name: Run doctests with pytest
  42. # run: python -m pytest --doctest-modules
  43. - name: Run Node tests
  44. run: npm test