forked from radis/radis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
87 lines (79 loc) · 3.28 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
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
77
78
79
80
81
82
83
84
85
86
87
language: python
python:
# We don't actually use the Travis Python, but this keeps it organized.
#- "2.7" # not tested anymore starting from 0.9.19
- "3.8"
os: linux
stages:
- name: test
if: branch = master OR branch = develop
# we dont test on other branches
- name: lint
if: branch = master OR branch = develop
# we dont lint on other branches
- name: deploy
if: branch = master
jobs:
include:
- stage: test
name: Test and Coverage
install:
# Install Micromamba
# We do this conditionally because it saves us some downloading if the
# version is the same.
# For now use http instead of https according to this comment:
# https://github.com/mamba-org/mamba/issues/1675#issuecomment-1127160021
- wget -qO- http://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
- ./bin/micromamba shell init -s bash -p ~/micromamba
- source ~/.bashrc
- micromamba activate base
# Useful for debugging any issues with conda
- micromamba info
# Update python version in environment
- sed -i -E 's/(python=)(.*)/\1'$TRAVIS_PYTHON_VERSION'/' ./environment.yml
# Create conda environment
- micromamba install xtensor -c conda-forge -y
- micromamba create -f environment.yml -y
# Activate and install test-only dependencies
- micromamba activate radis-env
- micromamba list
- pip install pytest-cov
- pip install -e . -v
script:
# Your test script goes here
- echo ">>> Run tests"
# use XVFB to have headless display port, and still run the Matplotlib tests.
- xvfb-run -a pytest --cov=./ --durations=10
# --durations=N to print the slowest N tests
# lookup 'addopts' in setup.cfg>[tools:pytest] for default tests
services:
- xvfb
after_success:
# codecoverage
- pip install codecov
- codecov
before_script:
- export MPLBACKEND=Agg
- stage: lint
name: Code Quality Checks
install:
- pip install pre-commit
- pre-commit install
script:
- pre-commit run --all-files
- stage: deploy
name: Deploy to PyPI
install:
- sudo apt-get update
script:
- echo "Deploying to PyPI"
before_deploy:
- sudo apt-get install pandoc
- pandoc README.rst -o README.md
deploy:
provider: pypi
user: "__token__"
password:
secure: dxZOpuKL1ezk3MM5FgY89zJYNL484x0jUZ+c3IB5q2GjpWl6qmCogoWG37iGZIcmldeIdVzga3pj5CC32eht4B0hJQX5QLVjCq9wwpfLs7Tkj4ODiAzvOchSLhfBOSLOIX33iW/+wxDjZ3fG61TzPI1z3ksdNh7+imdVYiV+G4FmOcxJKjFEgGm7CAwfbxso47ab9jbgm6FHbCC7HfpSiSrMpyIDSorJFk5XR11+Hoe6JjbKr11eeWuoO8EXKvSQeeJpsu0minqFyAy8nf9af/aU3NJU1LOlFM1DuoYlpQKwnbop5lBodU28zt4Asa1h8lp8Zu+wZSIaZSOeEoC6U/H/5zAE03W8SytWyWgNEtwuYLSiWacbOzeZOclVRoNu4P6Fz9hFdZuSANQlSQN7cBYFJiA8cbJDU4nb3srFoKlBLxCH9ZC3/K7rnZpjPmy7A35plNf+1dAEpB6adiWwsGy/VwCywHyJsBq7N3z6lN9wZ2SUPekl4y/sLobYPqg8y48u4bMqfd05Ub1QDUB3MSNALMa+OcczJvxNHZj+Bk4ooai/t/GOMOWNyy78VES7S/J77cWUheq+mW80ywCS8gcyF6ARR4EJxJGwp4q2RHwGdVvxbzc/uaKgi6I1bmLRw4cjJvOXx5ulLdANUftfMg4ATW/VAFqYLrdS/LpGX5A=
skip_existing: true
distributions: "sdist bdist_wheel"