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.
 
 

111 lines
2.7 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
  31. run: |
  32. pip install --upgrade pip pipenv
  33. - name: Install dependencies (all systems)
  34. run: |
  35. pipenv lock --pre
  36. pipenv sync --dev
  37. pipenv install --dev
  38. - name: Install dependencies (Windows-specific)
  39. if: ${{ matrix.os == 'windows-2019' }}
  40. run: |
  41. pipenv lock --dev -r > requirements.txt
  42. pip install -r requirements.txt
  43. - name: Run legacy tests
  44. run: |
  45. make legacy-tests
  46. doc-tests:
  47. runs-on: ${{ matrix.os }}
  48. strategy:
  49. fail-fast: false
  50. matrix:
  51. os:
  52. - ubuntu-18.04
  53. - ubuntu-20.04
  54. - macos-10.15
  55. - macos-11.0
  56. - windows-2019
  57. python_version:
  58. - '3.7'
  59. - '3.8'
  60. - '3.9'
  61. name: Doc tests (Python ${{ matrix.python_version }} on ${{ matrix.os }})
  62. steps:
  63. - uses: actions/checkout@v1
  64. - name: Set up Python
  65. uses: actions/setup-python@v1
  66. with:
  67. python-version: ${{ matrix.python_version }}
  68. - name: Prepare environment
  69. run: |
  70. pip install --upgrade pip pipenv
  71. - name: Install dependencies (all systems)
  72. run: |
  73. pipenv lock --pre
  74. pipenv sync --dev
  75. pipenv install --dev
  76. - name: Install dependencies (Windows-specific)
  77. if: ${{ matrix.os == 'windows-2019' }}
  78. run: |
  79. pipenv lock -r > requirements.txt
  80. pip install -r requirements.txt
  81. - name: Run doc tests (with coverage)
  82. if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.9' }}
  83. run: |
  84. make coverage-doctests
  85. - name: Run doc tests
  86. if: ${{ matrix.os != 'ubuntu-20.04' && matrix.python_version != '3.9' }}
  87. run: |
  88. make doctests
  89. - name: Push code coverage
  90. env:
  91. COVERALLS_PRO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
  92. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  93. if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.9' }}
  94. run: |
  95. pipenv run coveralls --service=github