-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #442 from ReactionMechanismGenerator/gh_actions_ci
Migrate CI from Travis to GH Actions
- Loading branch information
Showing
11 changed files
with
191 additions
and
3,659 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,57 @@ | ||
repo: | ||
- ./* | ||
|
||
examples: | ||
- examples/**/* | ||
|
||
tests: | ||
- arc/**/*Tests.py | ||
|
||
'Module: Conformers': | ||
- arc/species/conformers.py | ||
|
||
'Module: Converter': | ||
- arc/species/converter.py | ||
|
||
'Module: Job': | ||
- arc/job/job.py | ||
|
||
'Module: Local': | ||
- arc/job/local.py | ||
|
||
'Module: Main': | ||
- arc/main.py | ||
|
||
'Module: Parser': | ||
- arc/parser.py | ||
|
||
'Module: Plotter': | ||
- arc/plotter.py | ||
|
||
'Module: Processor': | ||
- arc/processor.py | ||
|
||
'Module: Reaction': | ||
- arc/reaction.py | ||
|
||
'Module: rmgdb': | ||
- arc/rmgdb.py | ||
|
||
'Module: Scheduler': | ||
- arc/scheduler.py | ||
|
||
'Module: Species': | ||
- arc/species/species.py | ||
|
||
'Module: SSH': | ||
- arc/job/ssh.py | ||
|
||
'Module: trsh': | ||
- arc/job/trsh.py | ||
|
||
'Module: Utils': | ||
- arc/job/utils/**/* | ||
|
||
'Module docs': | ||
- arc/docs/**/* | ||
|
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,56 @@ | ||
name: continuous integration | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up miniconda Python ${{ matrix.python-version }} | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: arc_env | ||
environment-file: environment.yml | ||
python-version: ${{ matrix.python-version }} | ||
auto-activate-base: false | ||
- name: Install dependencies | ||
shell: bash -l {0} | ||
run: | | ||
export PYTHONPATH=$PYTHONPATH:$(pwd) | ||
conda activate arc_env | ||
cd .. | ||
git clone https://github.com/ReactionMechanismGenerator/RMG-Py | ||
cd RMG-Py | ||
make | ||
cd .. | ||
git clone https://github.com/ReactionMechanismGenerator/RMG-database | ||
cd ARC | ||
conda deactivate | ||
make gcn-cpu | ||
cd .. | ||
echo $(pwd) | ||
conda list | ||
- name: Lint with flake8 | ||
shell: bash -l {0} | ||
run: | | ||
conda install flake8 | ||
# stop the build if there are Python syntax errors or undefined names | ||
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
python -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with nosetests | ||
shell: bash -l {0} | ||
run: | | ||
cd .. | ||
cd RMG-Py | ||
export PYTHONPATH=$PYTHONPATH:$(pwd) | ||
cd .. | ||
cd ARC | ||
conda activate arc_env | ||
make test | ||
codecov --token=f259713a-7f1d-4e9c-b140-bb3bb371d3ef |
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,48 @@ | ||
name: github pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- docs | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Upgrade pip | ||
run: | | ||
# install pip=>20.1 to use "pip cache dir" | ||
python3 -m pip install --upgrade pip | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: echo "::set-output name=dir::$(pip cache dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: python3 -m pip install -r ./requirements.txt | ||
|
||
- run: export PYTHONPATH=$PYTHONPATH:$(pwd); cd docs; make html | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3.7.3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/build/html/ | ||
|
||
# https://github.com/marketplace/actions/github-pages-action |
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,16 @@ | ||
# This workflow will triage pull requests and apply a label based on the | ||
# paths that are modified in the pull request. | ||
# See: https://github.com/actions/labeler/blob/master/README.md | ||
|
||
name: Labeler | ||
on: [pull_request] | ||
|
||
jobs: | ||
label: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/labeler@v2 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
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.