Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] switch from Travis CI to GitHub actions #151

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: docs deployment
on:
push:
branches:
- master

concurrency:
group: "${{ github.ref }}-${{ github.head_ref }}"
cancel-in-progress: true

defaults:
run:
shell: bash -l {0}

jobs:
docs:
if: "github.repository == 'MDAnalysis/pmda'"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: setup_miniconda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.7
auto-update-conda: true
channel-priority: flexible
channels: conda-forge
add-pip-as-python-dependency: true
mamba-version: "*"

- name: install package deps
run: |
mamba install 'mdanalysis<2' dask distributed sphinx
pip install sphinx-sitemap sphinx-rtd-theme

- name: check install
run: |
which python
which pip
conda info
conda list

- name: install package
run: |
pip install -v .

- name: build docs
run: |
python setup.py build_sphinx

- name: deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/sphinx/html
user_name: 'github-actions'
user_email: '[email protected]'
149 changes: 149 additions & 0 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: GH Actions CI
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master

concurrency:
# Probably overly cautious group naming.
# Commits to develop/master will cancel each other, but PRs will only cancel
# commits within the same PR
group: "${{ github.ref }}-${{ github.head_ref }}"
cancel-in-progress: true

defaults:
run:
shell: bash -l {0}

jobs:
unittests:
if: "github.repository == 'MDAnalysis/pmda'"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest,]
python-version: [3.6, 3.7, 3.8]
include:
- name: macOS_catalina_py37
os: macOS-10.15
python-version: 3.7
env:
CYTHON_TRACE_NOGIL: 1
MPLBACKEND: agg
GH_OS: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: setup_miniconda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
auto-update-conda: true
channel-priority: flexible
# The order of these channel matters: both provide "fundamental"
# software (curl, ssh, ...), but the version in biobuilds are very
# outdated. This can lead to problem when loading shared libraries,
# see https://github.com/MDAnalysis/mdanalysis/pull/3126#issuecomment-813112080
channels: conda-forge, biobuilds
add-pip-as-python-dependency: true
mamba-version: "*"
architecture: x64

- name: install_deps
run: |
mamba install 'mdanalysis>=1.1.1,<2' 'mdanalysistests>=1.1.1,<2' dask distributed joblib mock codecov
pip install 'coverage<5' 'pytest-cov==2.10.1' pytest-xdist

- name: check_setup
run: |
# Check OS and python setup
echo "OS: ${OS_NAME}"
which python
which pip
pip list
conda info
conda list

- name: install PMDA package
run: python -m pip install -v .

- name: run tests
run: |
pytest -v --cov=pmda --cov-report=xml --color=yes ./pmda/test

- name: codecov
uses: codecov/codecov-action@v2
with:
file: coverage.xml
fail_ci_if_error: True
verbose: True

pylint_check:
if: "github.repository == 'MDAnalysis/pmda'"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: setup_miniconda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.7
auto-update-conda: true
channel-priority: flexible
channels: conda-forge
add-pip-as-python-dependency: true
architecture: x64

- name: install
run: |
which pip
which python
pip install pylint

- name: pylint
env:
PYLINTRC: .pylintrc
run: |
pylint pmda


pypi_check:
if: "github.repository == 'MDAnalysis/pmda'"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: setup_miniconda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.7
auto-update-conda: true
channel-priority: flexible
channels: conda-forge
add-pip-as-python-dependency: true
# mamba not enabled as install longer than deps install
architecture: x64

- name: install_conda
run: |
conda install setuptools twine

- name: package PMDA
run: |
python setup.py sdist

- name: check package build
run: |
DISTRIBUTION=$(ls -t1 dist/pmda-*.tar.gz | head -n 1)
test -n "${DISTRIBUTION}" || { echo "no distribution dist/pmda-*.tar.gz found"; exit 1; }
echo "twine check $DISTRIBUTION"
twine check $DISTRIBUTION
76 changes: 0 additions & 76 deletions .travis.yml

This file was deleted.

9 changes: 5 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ MM/DD/YYYY VOD555, lilyminium, orbeckst, yuxuanzhuang

* 0.4.0

Changes
* requires MDAnalysis >= 1.0.0 and <2.0.0 (#122)
* dropped official support for Python 2.7 and 3.5 (all versions
of Python >= 3.6 supported by MDAnalysis 1.x are supported) (#152)

Enhancements
* Update doc theme to use sphinx-rtd-theme (Issue #124, PR #126)
* add parallel hbond analysis class (Issue #95)
Expand All @@ -32,10 +37,6 @@ Fixes
* fixed Contact fails with uneven blocks. (#140)
* raise ValueError when n_blocks > n_frames (Issue #137, PR #138)

Changes
* requires MDAnalysis >= 1.0.0 (#122)
* dropped official support for Python 3.5 (2.7 and >= 3.6 are supported)


10/14/2019 VOD555, nawtrey

Expand Down
55 changes: 0 additions & 55 deletions ci/deploy_docs.sh

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
packages=find_packages(),
install_requires=[
'MDAnalysis>=1.0.0',
'MDAnalysis>=1.1.1,<2',
'dask>=0.18',
'distributed',
'six',
Expand All @@ -58,5 +58,5 @@
],
tests_require=[
'pytest',
'MDAnalysisTests>=1.0.0', # keep
'MDAnalysisTests>=1.0.0,<2', # keep
], )