Skip to content

avoid deprecation warning in astropy.time.Time #113

avoid deprecation warning in astropy.time.Time

avoid deprecation warning in astropy.time.Time #113

Workflow file for this run

name: Tests
on:
pull_request:
workflow_dispatch:
jobs:
linter:
name: Linter
runs-on: ubuntu-latest
env:
ENV_NAME: linting
PYTHON: 3.8
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Setup Environment
run: |
pip install pre-commit
- name: Linting
run: |
pre-commit install
pre-commit run -a
datacache:
name: Cache Data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: cache-kernels
uses: actions/cache@v2
with:
path: ~/ap_cache
key: kernel_cache-${{ steps.date.outputs.date }}
- name: Download and cache
run: |
pip install astropy
python ./ci/cache_kernels.py save
if: steps.cache-kernels.outputs.cache-hit != 'true'
tests:
env:
ENV_NAME: tests
PYTHON: ${{ matrix.python-version }}
OS: ${{ matrix.os }}
needs: [datacache, linter]
name: Testing
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: load-cache
uses: actions/cache@v2
with:
path: ~/ap_cache
key: kernel_cache-${{ steps.date.outputs.date }}
- name: load kernels
run: |
pip install astropy
python ./ci/cache_kernels.py load
- name: Install
run: |
pip install pytest pytest-cov
pip install .
- name: Run Tests
run: |
python -m pytest --cov=lunarsky --cov-config=.coveragerc --cov-report xml:./coverage.xml --junitxml=test-reports/xunit.xml
- uses: codecov/codecov-action@v2
if: matrix.os == 'ubuntu-latest' && success()
with:
token: ${{secrets.CODECOV_TOKEN}} #required
file: ./coverage.xml #optional