-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Travis and move to GitHub Actions (#31)
* remove travisCI references * format with Black * trying initial GHA * update ci.yml * use Black default line length in GHA * revert to Black -l 99 * update gitignore * fix Black formatting using v21.9b0 * update pylint threshold and test variable names * fix pylint and add some type hints * add more type hinting * update docs * update env * Update README.md * Update README.md Co-authored-by: Mike Henry <11765982+mikemhenry@users.noreply.github.com>
- Loading branch information
1 parent
7ca27ba
commit e1de324
Showing
17 changed files
with
870 additions
and
595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,3 +100,7 @@ ENV/ | |
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# VSCode | ||
.vscode | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 12 additions & 10 deletions
22
devtools/conda-envs/test_env.yaml → devtools/conda-envs/env.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.