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

Remove Travis and move to GitHub Actions #31

Merged
merged 15 commits into from
Sep 24, 2021
125 changes: 125 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: CI

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

jobs:
test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux, Python 3.7
os: ubuntu-latest
python-version: "3.7"
conda-installer: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh

- name: Linux, Python 3.9
os: ubuntu-latest
python-version: "3.9"
conda-installer: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh

- name: MacOS, Python 3.7
os: macOS-latest
python-version: "3.7"
conda-installer: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-x86_64.sh

steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
with:
installer-url: ${{ matrix.conda-installer }}
python-version: ${{ matrix.python-version }}
activate-environment: test
channel-priority: true
environment-file: devtools/conda-envs/env.yaml
auto-activate-base: false
use-mamba: true

- 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
mamba --version
- name: Install package
shell: bash -l {0}
run: |
python -m pip install --no-deps .
- name: Run tests
shell: bash -l {0}
run: |
pytest -v --cov=openff/arsenic --cov-report=xml --color=yes openff/arsenic/tests/
- name: CodeCov
uses: codecov/codecov-action@v1
if: always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
yml: ./.codecov.yml

lint-format:
name: Lint & format checks
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
with:
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
python-version: "3.7"
activate-environment: test
channel-priority: true
environment-file: devtools/conda-envs/env.yaml
auto-activate-base: false
use-mamba: true

- 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 linter / formatter
shell: bash -l {0}
run: |
mamba install pylint black
- name: Install package
shell: bash -l {0}
run: |
python -m pip install --no-deps .
- name: Run pylint
shell: bash -l {0}
run: |
pylint openff/arsenic/ --fail-under 6
- name: Run black check
shell: bash -l {0}
if: always()
run: |
black --check -l 99 openff/arsenic/ --exclude openff/arsenic/_version.py
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,7 @@ ENV/

# mypy
.mypy_cache/

# VSCode
.vscode

57 changes: 0 additions & 57 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 @@ openff-arsenic
==============================
[//]: # (Badges)

[![Travis Build Status](https://travis-ci.com/openforcefield/openff-arsenic.svg?branch=master)](https://travis-ci.com/openforcefield/openff-arsenic)

[![codecov](https://codecov.io/gh/openforcefield/openff-arsenic/branch/master/graph/badge.svg)](https://codecov.io/gh/openforcefield/openff-arsenic/branch/master)
[![Documentation Status](https://readthedocs.org/projects/openff-arsenic/badge/?version=latest)](https://openff-arsenic.readthedocs.io/en/latest/?badge=latest)

Expand Down
2 changes: 0 additions & 2 deletions devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ conda installation, and other development tools not directly related to the codi
You should test your code, but do not feel compelled to use these specific programs. You also may not need Unix and
Windows testing if you only plan to deploy on specific platforms. These are just to help you get started

* `travis-ci`: Linux and OSX based testing through [Travis-CI](https://about.travis-ci.com/)
* `before_install.sh`: Pip/Miniconda pre-package installation script for Travis
* `appveyor`: Windows based testing through [AppVeyor](https://www.appveyor.com/) (there are no files directly related to this)

### Conda Environment:
Expand Down
22 changes: 12 additions & 10 deletions devtools/conda-envs/test_env.yaml → devtools/conda-envs/env.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
name: test
name: arsenic
channels:
- conda-forge
dependencies:
# Base depends
# Base depends
- python
- pip

# Testing
- pytest
- pytest-cov
- codecov
- black
- networkx
- numpy
- matplotlib
- seaborn
- plotly
- scikit-learn
- sphinx
- sphinx_rtd_theme

# Pip-only installs
#- pip:
# - codecov
# format
- black

# testing
- pytest
- pytest-cov
- codecov
41 changes: 0 additions & 41 deletions devtools/travis-ci/before_install.sh

This file was deleted.

8 changes: 4 additions & 4 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ API Documentation
.. autosummary::
:toctree: autosummary

arsenic.plotting
arsenic.plotlying
arsenic.stats
arsenic.wrangle
openff.arsenic.plotting
openff.arsenic.plotlying
openff.arsenic.stats
openff.arsenic.wrangle
Loading