-
Notifications
You must be signed in to change notification settings - Fork 8
76 lines (66 loc) · 2.83 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: build_and_test
on:
push:
branches:
- main
- lsst-dev
- master
pull_request:
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.11"
miniforge-variant: Mambaforge
miniforge-version: latest
show-channel-urls: true
activate-environment: test
- name: Install dependencies
# Might be quicker to install rubin-env plus any necessary additions.
shell: bash -l {0}
run: |
mamba install -y "numpy>1.15" scipy "matplotlib>3.1" pandas llvmlite numba "astropy>=3.2" "photutils>=1.7" astroquery coloredlogs scikit-image>=0.20 h5py emcee tqdm mpi4py schwimmbad "iminuit>=2" "coverage>=3.6" configparser coveralls deprecated pyyaml pytest pytest-cov rubin-libradtran "getCalspec>=2.0.0"
# python -c "from getCalspec.rebuild import rebuild_tables; rebuild_tables()"
pip install lsst.utils
pip install git+https://github.com/LSSTDESC/getObsAtmo.git@main
mamba install astrometry
- name: Download test data
shell: bash -l {0}
run: |
wget -r -q -nc http://data.astrometry.net/5000/index-5002-24.fits
wget -r -q -nc http://data.astrometry.net/5000/index-5000-40.fits
mv data.astrometry.net/5000/index-*.fits $CONDA_PREFIX/data/
export ASTROMETRYNET_DIR=$CONDA_PREFIX
- name: List installed packages
shell: bash -l {0}
run: |
conda list
pip list -v
- name: Build and install
shell: bash -l {0}
run: |
pip install -v --no-deps -e .
- name: Run full chain test
shell: bash -l {0}
run: |
pytest tests/test_fullchain.py --log-cli-level=INFO --cov --cov-report lcov
- name: Run pytests
shell: bash -l {0}
run: |
pytest tests/test_extractor.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_simulator.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_utils.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_fitter.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_multispectra.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
- name: Run doctests and coverage
shell: bash -l {0}
run: pytest spectractor tests/test_fullchain.py -v --cov --cov-append --cov-report lcov --doctest-modules spectractor --doctest-continue-on-failure
continue-on-error: true
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov