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

Set up GitHub Actions CI #151

Merged
merged 4 commits into from
Nov 4, 2020
Merged
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
65 changes: 65 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: ci

on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
schedule:
# Run a cron job once daily
- cron: "0 0 * * *"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that GHA will run pytest once a day?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. The main value here, in my experience, is detecting upstream changes and API breaks here, instead of while you're working on a PR or doing science.

Travis had this feature but you had to enable it through the website UI, so I don't think many people used it.


jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: [3.7]
env:
PYVER: ${{ matrix.python-version }}
PACKAGE: paprika

steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v1
with:
python-version: ${{ matrix.python-version }}
activate-environment: paprika-dev
channel-priority: true
environment-file: devtools/conda-envs/test_env.yaml
auto-activate-base: false

- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a

- name: Environment Information
shell: bash -l {0}
run: |
conda info --all
conda list

- name: Install package
shell: bash -l {0}
run: |
python -m pip install --no-deps .

- name: Run tests
shell: bash -l {0}
run: |
PYTEST_ARGS=" -v --cov=$PACKAGE --cov-report=xml "
pytest $PYTEST_ARGS $PACKAGE

- name: Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
50 changes: 0 additions & 50 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pAPRika is a toolkit for setting up, running, and analyzing free energy molecular dynamics simulations.

# Badges
[![Build Status](https://travis-ci.org/slochower/pAPRika.svg?branch=master)](https://travis-ci.org/slochower/pAPRika)
[![Build Status](https://github.com/slochower/pAPRika/workflows/ci/badge.svg)](https://github.com/slochower/pAPRika/actions?query=branch%3Amaster+workflow%3Aci)
[![Documentation Status](https://readthedocs.org/projects/paprika/badge/?version=stable)](https://paprika.readthedocs.io/en/stable/?badge=stable)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/paprika/badges/installer/conda.svg)](https://conda.anaconda.org/conda-forge)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/slochower/pAPRika.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/slochower/pAPRika/context:python)
Expand Down
1 change: 0 additions & 1 deletion devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: paprika-dev
channels:
- conda-forge
- omnia
- mwt
dependencies:

# Base depends
Expand Down
118 changes: 0 additions & 118 deletions devtools/scripts/create_conda_env.py

This file was deleted.

42 changes: 0 additions & 42 deletions devtools/travis-ci/before_install.sh

This file was deleted.