-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (64 loc) · 2.38 KB
/
test_suite.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
name: Tests
# Test on all pushes, except when the push is literally just a tag (because we
# tag automatically via CI, and therefore there's no extra code in that push).
# Also, only test on pull requests into master.
on:
push:
tags-ignore:
- 'v*'
pull_request:
branches:
- 'master'
jobs:
tests:
env:
ENV_NAME: tests
PYTHON: ${{ matrix.python-version }}
OS: ${{ matrix.os }}
name: Testing
# needs: [linter]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- name: Get Miniconda MacOSX
if: matrix.os == 'macos-latest'
run: |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O $HOME/miniconda.sh;
bash $HOME/miniconda.sh -b -p $HOME/miniconda
- name: Get Miniconda Linux
if: matrix.os == 'ubuntu-latest'
run: |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh;
bash $HOME/miniconda.sh -b -p $HOME/miniconda
- name: Setup Environment
run: |
export PATH="$HOME/miniconda/bin:$PATH"
./ci/install_conda.sh
- name: Install
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source activate ${ENV_NAME}
conda install pytest pytest-runner coverage flake8 numpy "numba<0.49.0" cffi astropy h5py scipy pip
conda install -c conda-forge healpy pyuvdata fftw
CPATH=$(dirname $(which python))/../include:$CPATH LIBRARY_PATH=$(dirname $(which python))/../lib:$LIBRARY_PATH pip install git+https://github.com/UPennEoR/ssht_numba.git
pip install git+https://github.com/UPennEoR/spin1_beam_model.git
echo "which gfortran"
which gfortran
pip install .[testing]
- name: Run Tests
run: |
export PATH="$HOME/miniconda/bin:$PATH"
source activate $ENV_NAME
python -m pytest --cov=RIMEz --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25
- uses: codecov/codecov-action@master
if: matrix.os == 'ubuntu-latest' && success()
with:
token: ${{secrets.CODECOV_TOKEN}} #required
file: ./coverage.xml #optional