Skip to content

Commit 01387e6

Browse files
committed
replace Travis CI with GitHub actions
- Tests only (gratuitously expanded to MacOS and Windows), gh-ci.yml - add docs action - install pathlib2 for 2.7 - updated supported Python versions in setup.py (2.7, 3.6-3.9)
1 parent 4cb391f commit 01387e6

4 files changed

Lines changed: 128 additions & 44 deletions

File tree

.github/workflows/docs.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: docs deployment
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
concurrency:
8+
group: "${{ github.ref }}-${{ github.head_ref }}"
9+
cancel-in-progress: true
10+
11+
jobs:
12+
docs:
13+
if: github.repository == 'MDAnalysis/MDAnalysisData'
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Setup python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: 3.9
23+
24+
- name: Display Python version
25+
run: python -c "import sys; print(sys.version)"
26+
27+
- name: Install sphinx, pytest, pytest plugins
28+
run: |
29+
python -m pip install wheel
30+
python -m pip install pytest pytest-cov pytest-pep8 pytest-mock codecov
31+
python -m pip install sphinx sphinx-sitemap sphinx-rtd-theme
32+
33+
- name: Install main dependencies
34+
run: |
35+
python -m pip install six setuptools tqdm
36+
37+
- name: install package
38+
run: |
39+
pip install -v .
40+
41+
- name: build docs
42+
run: |
43+
python setup.py build_sphinx
44+
45+
- name: deploy docs
46+
uses: peaceiris/actions-gh-pages@v3
47+
with:
48+
github_token: ${{ secrets.GITHUB_TOKEN }}
49+
publish_dir: ./build/sphinx/html
50+
user_name: 'github-actions'
51+
user_email: 'github-action@users.noreply.github.com'

.github/workflows/gh-ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: GH Actions CI
2+
3+
on:
4+
# run every Sunday at 3:53 UTC
5+
schedule:
6+
- cron: "53 3 * * 0"
7+
push:
8+
branches:
9+
- "master"
10+
pull_request:
11+
branches:
12+
- "master"
13+
14+
concurrency:
15+
group: "${{ github.ref }}-${{ github.head_ref }}"
16+
cancel-in-progress: true
17+
18+
jobs:
19+
unittests:
20+
name: Test ${{ matrix.os }} with Python ${{ matrix.python-version }}
21+
if: github.repository == 'MDAnalysis/MDAnalysisData'
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os: [ubuntu-latest]
27+
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
28+
include:
29+
- os: macOS-latest
30+
python-version: 2.7
31+
- os: macOS-latest
32+
python-version: 3.9
33+
- os: windows-latest
34+
python-version: 2.7
35+
- os: windows-latest
36+
python-version: 3.9
37+
38+
steps:
39+
- uses: actions/checkout@v2
40+
41+
- name: Setup python
42+
uses: actions/setup-python@v2
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
46+
- name: Display Python version
47+
run: python -c "import sys; print(sys.version)"
48+
49+
- name: Install testing dependencies (pytest, pytest plugins)
50+
run: |
51+
python -m pip install wheel
52+
python -m pip install pytest pytest-cov pytest-pep8 pytest-mock codecov
53+
54+
- name: Install package dependencies
55+
run: |
56+
python -m pip install six setuptools tqdm
57+
58+
- name: Install compatibility dependencies for Python 2.7 only
59+
if: startsWith(matrix.python-version, '2.7')
60+
run: python -m pip install pathlib2
61+
62+
- name: Install package
63+
run: |
64+
python -m pip install .
65+
66+
- name: Run tests
67+
run: |
68+
pytest -v --cov=MDAnalysisData --cov-report=xml --color=yes MDAnalysisData
69+
70+
- name: Codecov
71+
uses: codecov/codecov-action@v2
72+
with:
73+
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
74+
file: ./coverage.xml
75+
fail_ci_if_error: True
76+
verbose: True

.travis.yml

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

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,10 @@ def dynamic_author_list():
119119
'Programming Language :: Python :: 2',
120120
'Programming Language :: Python :: 2.7',
121121
'Programming Language :: Python :: 3',
122-
'Programming Language :: Python :: 3.4',
123-
'Programming Language :: Python :: 3.5',
124122
'Programming Language :: Python :: 3.6',
125123
'Programming Language :: Python :: 3.7',
126124
'Programming Language :: Python :: 3.8',
125+
'Programming Language :: Python :: 3.9',
127126
'Topic :: Scientific/Engineering',
128127
'Topic :: Scientific/Engineering :: Bio-Informatics',
129128
'Topic :: Scientific/Engineering :: Chemistry',

0 commit comments

Comments
 (0)