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.
 
 

123 line
3.1 KiB

  1. name: Tests
  2. on:
  3. push:
  4. branches: [main, features]
  5. pull_request:
  6. branches: [main, features]
  7. jobs:
  8. legacy-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. name: Legacy tests (Python ${{ matrix.python_version }} on ${{ matrix.os }})
  24. steps:
  25. - uses: actions/checkout@v1
  26. - name: Set up Python
  27. uses: actions/setup-python@v1
  28. with:
  29. python-version: ${{ matrix.python_version }}
  30. - name: Prepare environment (non-Windows systems)
  31. if: ${{ matrix.os != 'windows-2019' }}
  32. run: |
  33. pip install --upgrade pip pipenv
  34. - name: Prepare environment (Windows)
  35. if: ${{ matrix.os == 'windows-2019' }}
  36. run: |
  37. python -mpip install --upgrade pip pipenv
  38. - name: Install dependencies (all systems)
  39. run: |
  40. pipenv lock --pre
  41. pipenv sync --dev
  42. pipenv install --dev
  43. - name: Install dependencies (Windows)
  44. if: ${{ matrix.os == 'windows-2019' }}
  45. run: |
  46. pipenv lock --dev -r > requirements.txt
  47. python -mpip install -r requirements.txt
  48. - name: Run legacy tests
  49. run: |
  50. make legacy-tests
  51. doc-tests:
  52. runs-on: ${{ matrix.os }}
  53. strategy:
  54. fail-fast: false
  55. matrix:
  56. os:
  57. - ubuntu-18.04
  58. - ubuntu-20.04
  59. - macos-10.15
  60. - macos-11.0
  61. - windows-2019
  62. python_version:
  63. - '3.7'
  64. - '3.8'
  65. - '3.9'
  66. name: Doc tests (Python ${{ matrix.python_version }} on ${{ matrix.os }})
  67. steps:
  68. - uses: actions/checkout@v1
  69. - name: Set up Python
  70. uses: actions/setup-python@v1
  71. with:
  72. python-version: ${{ matrix.python_version }}
  73. - name: Prepare environment (non-Windows systems)
  74. if: ${{ matrix.os != 'windows-2019' }}
  75. run: |
  76. pip install --upgrade pip pipenv
  77. - name: Prepare environment (Windows)
  78. if: ${{ matrix.os == 'windows-2019' }}
  79. run: |
  80. python -mpip install --upgrade pip pipenv
  81. - name: Install dependencies (all systems)
  82. run: |
  83. pipenv lock --pre
  84. pipenv sync --dev
  85. pipenv install --dev
  86. - name: Install dependencies (Windows)
  87. if: ${{ matrix.os == 'windows-2019' }}
  88. run: |
  89. pipenv lock -r > requirements.txt
  90. python -mpip install -r requirements.txt
  91. - name: Run doc tests (with coverage)
  92. if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.9' }}
  93. run: |
  94. make coverage-doctests
  95. - name: Run doc tests (without coverage)
  96. if: ${{ matrix.os != 'ubuntu-20.04' || matrix.python_version != '3.9' }}
  97. run: |
  98. make doctests
  99. - name: Push code coverage
  100. env:
  101. COVERALLS_PRO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
  102. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  103. if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.9' }}
  104. run: |
  105. pipenv run coveralls --service=github