Skip to content

Commit 160ddca

Browse files
authored
[MAINT] Add gh actions CI (#90)
* Adds base CI * Remove appveyor, update setup to include newer versions of python * Replace doc deployment with gh action * update badges
1 parent be6132a commit 160ddca

8 files changed

Lines changed: 159 additions & 177 deletions

File tree

.appveyor.yml

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

.github/workflows/docs.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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+
defaults:
12+
run:
13+
shell: bash -l {0}
14+
15+
jobs:
16+
docs:
17+
if: "github.repository == 'MDAnalysis/GridDataFormats'"
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: setup_miniconda
24+
uses: conda-incubator/setup-miniconda@v2
25+
with:
26+
python-version: 3.7
27+
auto-update-conda: true
28+
channel-priority: flexible
29+
channels: conda-forge
30+
add-pip-as-python-dependency: true
31+
mamba-version: "*"
32+
33+
- name: install package deps
34+
run: |
35+
mamba install numpy scipy pytest pytest-cov codecov six sphinx
36+
pip install sphinx-sitemap sphinx-rtd-theme
37+
38+
- name: check install
39+
run: |
40+
which python
41+
which pip
42+
conda info
43+
conda list
44+
45+
- name: install package
46+
run: |
47+
pip install -v .
48+
49+
- name: build docs
50+
run: |
51+
python setup.py build_sphinx
52+
53+
- name: deploy docs
54+
env:
55+
GIT_CI_USER: github-actions
56+
GIT_CI_EMAIL: "github-action@users.noreply.github.com"
57+
MDA_DOCDIR: build/sphinx/html
58+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
GH_REPOSITORY: github.com/MDAnalysis/GridDataFormats.git
60+
GH_DOC_BRANCH: master
61+
62+
run: |
63+
cd ${MDA_DOCDIR}
64+
65+
rev=$(git rev-parse --short HEAD)
66+
67+
# set up git
68+
git init
69+
git config user.name ${GIT_CI_USER}
70+
git config user.email ${GIT_CI_EMAIL}
71+
git remote add upstream "https://${GH_TOKEN}@${GH_REPOSITORY}"
72+
git fetch --depth 50 upstream ${GH_DOC_BRANCH} gh-pages
73+
git reset upstream/gh-pages
74+
75+
touch .
76+
touch .nojekyll
77+
78+
# comit and push
79+
git add -A .
80+
git commit -m "rebuilt html docs from branch ${GH_DOC_BRANCH} with sphinx at ${rev}"
81+
git push -q upstream HEAD:gh-pages

.github/workflows/gh-ci.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: GH Actions CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
concurrency:
11+
group: "${{ github.ref }}-${{ github.head_ref }}"
12+
cancel-in-progress: true
13+
14+
defaults:
15+
run:
16+
shell: bash -l {0}
17+
18+
jobs:
19+
unittests:
20+
if: "github.repository == 'MDAnalysis/GridDataFormats'"
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
os: [ubuntu-latest, ]
26+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
27+
include:
28+
- os: windows-latest
29+
python-version: 3.7
30+
31+
steps:
32+
- uses: actions/checkout@v2
33+
34+
- name: setup_miniconda
35+
uses: conda-incubator/setup-miniconda@v2
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
auto-update-conda: true
39+
channel-priority: flexible
40+
channels: conda-forge
41+
add-pip-as-python-dependency: true
42+
mamba-version: "*"
43+
44+
- name: install package deps
45+
run: |
46+
mamba install numpy scipy pytest pytest-cov codecov six
47+
48+
- name: check install
49+
run: |
50+
which python
51+
which pip
52+
conda info
53+
conda list
54+
55+
- name: install package
56+
run: |
57+
pip install -v .
58+
59+
- name: run unit tests
60+
run: |
61+
pytest -v --cov=gridData --cov-report=xml ./gridData/tests
62+
63+
- name: codecov
64+
uses: codecov/codecov-action@v2
65+
with:
66+
file: coverage.xml
67+
fail_ci_if_error: True
68+
verbose: True

.travis.yml

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

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ Contributors:
2121
* René Hafner (Hamburger) <renehamburger1993>
2222
* Lily Wang <lilyminium>
2323
* Josh Vermaas <jvermaas>
24+
* Irfan Alibay <IAlibay>

README.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,13 @@ welcome. Please fork the repository and submit a `pull request`_.
8484
.. _pull request:
8585
https://github.com/MDAnalysis/GridDataFormats/pulls
8686

87-
.. |build| image:: https://travis-ci.org/MDAnalysis/GridDataFormats.svg?branch=master
88-
:alt: Build Status
89-
:target: https://travis-ci.org/MDAnalysis/GridDataFormats
87+
.. |numfocus| image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
88+
:alt: Powered by NumFOCUS
89+
:target: https://www.numfocus.org/
90+
91+
.. |build| image:: https://github.com/MDAnalysis/GridDataFormats/actions/workflows/gh-ci.yaml/badge.svg
92+
:alt: Github Actions Build Status
93+
:target: https://github.com/MDAnalysis/GridDataFormats/actions/workflows/gh-ci.yaml
9094

9195
.. |cov| image:: https://codecov.io/gh/MDAnalysis/GridDataFormats/branch/master/graph/badge.svg
9296
:alt: Coverage Status

ci/deploy_docs.sh

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

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
'Programming Language :: Python :: 3.5',
3535
'Programming Language :: Python :: 3.6',
3636
'Programming Language :: Python :: 3.7',
37+
'Programming Language :: Python :: 3.8',
38+
'Programming Language :: Python :: 3.9',
3739
'Topic :: Scientific/Engineering',
3840
'Topic :: Software Development :: Libraries :: Python Modules',
3941
],

0 commit comments

Comments
 (0)