forked from ReactionMechanismGenerator/ARC
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (75 loc) · 2.29 KB
/
cont_int.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on:
push:
branches:
- '*'
pull_request:
branches:
- main
types: [opened, synchronize, reopened, ready_for_review, review_requested]
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Setup Mambaforge Python 3.7
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: arc_env
python-version: 3.7
use-mamba: true
- name: Update environment
run: |
mamba env update -n arc_env -f environment.yml
conda list
- name: Install codecov
run: mamba install -y -c conda-forge codecov
- name: Install dependencies
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)
echo 'export PYTHONPATH=$PYTHONPATH:'"$(pwd)" >> ~/.bashrc
conda activate arc_env
cd ..
git clone https://github.com/ReactionMechanismGenerator/RMG-Py
cd RMG-Py
export PYTHONPATH=$PYTHONPATH:$(pwd)
echo 'export PYTHONPATH=$PYTHONPATH:'"$(pwd)" >> ~/.bashrc
make
cd ..
git clone https://github.com/ReactionMechanismGenerator/RMG-database
cd ARC
source ~/.bashrc
make install-all
source ~/.bashrc
conda activate arc_env
echo $PYTHONPATH
conda list
- name: Lint with flake8
run: |
mamba install flake8
mamba config --append channels anaconda
# 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 pytest
run: |
source ~/.bashrc
conda activate arc_env
make test
codecov --token=f259713a-7f1d-4e9c-b140-bb3bb371d3ef
- name: Functional Test
run: |
source ~/.bashrc
conda activate arc_env
make test-functional
- name: Code coverage
run: codecov