forked from ReactionMechanismGenerator/RMG-Py
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (73 loc) · 2.77 KB
/
CI.yml
File metadata and controls
74 lines (73 loc) · 2.77 KB
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
name: CI Tests
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 8 * * 1-5"
push:
pull_request:
branches:
- main
types: [opened, synchronize, reopened, ready_for_review, review_requested]
jobs:
build-and-test-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
env: # update this if needed to match a pull request on the RMG-database
RMG_DATABASE_BRANCH: main
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
python-version: 3.7
activate-environment: rmg_env
use-mamba: true
- name: Install codecov
run: mamba install -y -c conda-forge codecov
- name: mamba info
run: |
mamba info
mamba list
- name: Install and link Julia dependencies
run: |
julia -e "using Pkg; Pkg.add(PackageSpec(url=\"https://github.com/ReactionMechanismGenerator/ReactionMechanismSimulator.jl\", rev=\"main\"))"
julia -e "using Pkg; Pkg.add(\"PyCall\"); Pkg.add(\"DifferentialEquations\")"
python -c "import julia; julia.install()"
ln -sfn $(which python-jl) $(which python)
- name: Install MOPAC
env:
MOPACKEY: ${{ secrets.MOPACKEY }}
timeout-minutes: 1
continue-on-error: true # allowed to fail on pull request from a forked repository
run: |
set +o pipefail
yes 'Yes' | ${CONDA_PREFIX}/bin/mopac "$MOPACKEY"
- name: Install and compile RMG
run: |
cd ..
git clone -b $RMG_DATABASE_BRANCH https://github.com/ReactionMechanismGenerator/RMG-database.git
cd RMG-Py
git clone -b arkanepy3 https://github.com/mjohnson541/Q2DTor.git external/Q2DTor
make
- name: Trigger RMG-tests
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' && github.ref != 'refs/heads/stable' }} # only push events to branches other than main and stable
env:
GH_TOKEN: ${{ secrets.RMG_DEV_TOKEN }}
run: ./trigger-rmg-tests.sh
- name: Unit tests
run: make test-unittests
- name: Functional tests
if: ${{ success() || failure() }} # Run even if the unit tests failed (but not if they were cancelled)
run: make test-functional
- name: Database tests
if: ${{ success() || failure() }} # Run even if the functional tests failed (but not if they were cancelled)
run: make test-database
- name: Code coverage
run: codecov