Skip to content

Commit a6b13e7

Browse files
authored
Move travis CI to GitHubActions (#4254)
* test * remove comment, specify python>=3.6 in env.yml * make prettier, upload codecov
1 parent fa24310 commit a6b13e7

File tree

3 files changed

+85
-75
lines changed

3 files changed

+85
-75
lines changed

.github/workflows/pytest.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: pytest
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
pytest:
10+
strategy:
11+
matrix:
12+
python-version: ["3.6"]
13+
os: [ubuntu-18.04]
14+
floatx: [float32, float64]
15+
test-subset:
16+
- |
17+
--ignore=pymc3/tests/test_examples.py
18+
--ignore=pymc3/tests/test_distributions_random.py
19+
--ignore=pymc3/tests/test_variational_inference.py
20+
--ignore=pymc3/tests/test_shared.py
21+
--ignore=pymc3/tests/test_smc.py
22+
--ignore=pymc3/tests/test_updates.py
23+
--ignore=pymc3/tests/test_posteriors.py
24+
--ignore=pymc3/tests/test_sampling.py
25+
--ignore=pymc3/tests/test_parallel_sampling.py
26+
--ignore=pymc3/tests/test_dist_math.py
27+
--ignore=pymc3/tests/test_distribution_defaults.py
28+
--ignore=pymc3/tests/test_distributions_timeseries.py
29+
--ignore=pymc3/tests/test_random.py
30+
--ignore=pymc3/tests/test_gp.py
31+
--ignore=pymc3/tests/test_shape_handling
32+
--ignore=pymc3/tests/test_quadpotential.py
33+
- |
34+
pymc3/tests/test_distributions_random.py
35+
pymc3/tests/test_shared.py
36+
pymc3/tests/test_smc.py
37+
pymc3/tests/test_sampling.py
38+
pymc3/tests/test_parallel_sampling.py
39+
pymc3/tests/test_dist_math.py
40+
pymc3/tests/test_distribution_defaults.py
41+
pymc3/tests/test_distributions_timeseries.py
42+
pymc3/tests/test_random.py
43+
- |
44+
pymc3/tests/test_examples.py
45+
pymc3/tests/test_posteriors.py
46+
pymc3/tests/test_gp.py
47+
pymc3/tests/test_quadpotential.py
48+
- |
49+
pymc3/tests/test_variational_inference.py
50+
pymc3/tests/test_updates.py
51+
pymc3/tests/test_shape_handling.py
52+
runs-on: ${{ matrix.os }}
53+
env:
54+
TEST_SUBSET: ${{ matrix.test-subset }}
55+
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=native'
56+
defaults:
57+
run:
58+
shell: bash -l {0}
59+
steps:
60+
- uses: actions/checkout@v2
61+
- name: Cache conda
62+
uses: actions/cache@v1
63+
env:
64+
# Increase this value to reset cache if environment-dev.yml has not changed
65+
CACHE_NUMBER: 0
66+
with:
67+
path: ~/conda_pkgs_dir
68+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
69+
hashFiles('environment-dev.yml') }}
70+
- uses: conda-incubator/setup-miniconda@v2
71+
with:
72+
activate-environment: testenv
73+
channel-priority: strict
74+
environment-file: environment-dev.yml
75+
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
76+
- run: |
77+
conda activate testenv
78+
python -m pytest -v --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
79+
- name: Upload coverage to Codecov
80+
uses: codecov/codecov-action@v1
81+
with:
82+
env_vars: OS,PYTHON
83+
name: codecov-umbrella
84+
fail_ci_if_error: false

.travis.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

environment-dev.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- python=3.6
6+
- python>=3.6
77
- arviz>=0.9
88
- theano-pymc==1.0.11
99
- numpy>=1.13
@@ -22,9 +22,6 @@ dependencies:
2222
- nose-parameterized>=0.6
2323
- numpydoc>=0.9
2424
- pre-commit>=2.8.0
25-
- pycodestyle>=2.3
26-
- pyflakes>=1.5
27-
- pylint>=1.7
2825
- pytest-cov>=2.5
2926
- pytest>=3.0
3027
- recommonmark>=0.4
@@ -33,12 +30,9 @@ dependencies:
3330
- sphinx>=1.5
3431
- watermark
3532
- parameterized
36-
- black
3733
- ipywidgets
3834
- dataclasses # python_version < 3.7
3935
- contextvars # python_version < 3.7
4036
- mkl-service
4137
- dill
4238
- libblas=*=*mkl
43-
- pip:
44-
- black_nbconvert

0 commit comments

Comments
 (0)