-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy path.travis.yml
49 lines (42 loc) · 1.39 KB
/
.travis.yml
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
# run travis on these branches (and all PRs)
branches:
only:
- master
- develop
# use the minimal travis environment since we test in conda
language: minimal
dist: focal
os:
- osx
- linux
env:
global:
- CC_TEST_REPORTER_ID=951f438ac8a0fa93801ff0bf69922df59fe03800bf7ea8ab77a3c26cda444979
before_install:
# setup mambaforge
- wget -q -O Mambaforge.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
- bash Mambaforge.sh -b -p "${HOME}/conda" > /dev/null
- source "${HOME}/conda/etc/profile.d/conda.sh"
- source "${HOME}/conda/etc/profile.d/mamba.sh"
- mamba activate
install:
# install genomepy
- mamba env create --name genomepy --file environment.yml
- mamba activate genomepy
- pip install . --no-deps --ignore-installed
before_script:
# install codeclimate test coverage
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget -O cc-test-reporter https://codeclimate.com/downloads/test-reporter/test-reporter-latest-darwin-amd64;
chmod +x ./cc-test-reporter;
./cc-test-reporter before-build;
fi
script:
- pytest -vvv
--reruns 1 --reruns-delay 10
--cov=genomepy --cov-config=tests/.coveragerc --cov-report=xml
after_script:
# send the coverage data to Code Climate
- if [ -f ./cc-test-reporter ]; then
./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT;
fi