A library that computes the ephemerides.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

77 lines
2.0 KiB

  1. name: Tests
  2. on:
  3. push:
  4. branches: [main, features]
  5. pull_request:
  6. branches: [main, features]
  7. jobs:
  8. doc-tests:
  9. runs-on: ${{ matrix.os }}
  10. strategy:
  11. fail-fast: false
  12. matrix:
  13. os:
  14. - ubuntu-18.04
  15. - ubuntu-20.04
  16. - macos-10.15
  17. - macos-11.0
  18. - windows-2019
  19. python_version:
  20. - '3.7'
  21. - '3.8'
  22. - '3.9'
  23. - '3.10'
  24. name: Doc tests (Python ${{ matrix.python_version }} on ${{ matrix.os }})
  25. steps:
  26. - uses: actions/checkout@v2
  27. - name: Set up Python ${{ matrix.python_version }}
  28. uses: actions/setup-python@v2
  29. with:
  30. python-version: ${{ matrix.python_version }}
  31. architecture: x64
  32. - name: Prepare environment (non-Windows systems)
  33. if: ${{ matrix.os != 'windows-2019' }}
  34. run: |
  35. pip install --upgrade pip pipenv
  36. - name: Prepare environment (Windows)
  37. if: ${{ matrix.os == 'windows-2019' }}
  38. run: |
  39. python -mpip install --upgrade pip pipenv
  40. - name: Install dependencies (all systems)
  41. env:
  42. PIP_PREFER_BINARY: 1
  43. run: |
  44. pipenv lock --pre
  45. pipenv sync --dev
  46. pipenv install --dev
  47. - name: Install dependencies (Windows)
  48. if: ${{ matrix.os == 'windows-2019' }}
  49. run: |
  50. pipenv lock -r > requirements.txt
  51. python -mpip install -r requirements.txt
  52. - name: Run doc tests (with coverage)
  53. if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.10' }}
  54. run: |
  55. make coverage-doctests
  56. - name: Run doc tests (without coverage)
  57. if: ${{ matrix.os != 'ubuntu-20.04' || matrix.python_version != '3.10' }}
  58. run: |
  59. make doctests
  60. - name: Push code coverage
  61. env:
  62. COVERALLS_PRO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
  63. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  64. if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.10' }}
  65. run: |
  66. pipenv run coveralls --service=github