-
Notifications
You must be signed in to change notification settings - Fork 11
91 lines (89 loc) · 3.13 KB
/
master_branch.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
88
89
90
91
name: Core Version
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
jobs:
Lint_Compliance:
env:
DISCORD_WEBHOOK_MERGE: ${{ secrets.DISCORD_WEBHOOK_MERGE}}
DISCORD_WEBHOOK_MODEL: ${{ secrets.DISCORD_WEBHOOK_MODEL}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black requests
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Lint with black
run:
black .
- name: Failure handler
if: ${{ failure() }}
run:
python .github/tests/failure_reporter.py "$DISCORD_WEBHOOK_MERGE" $GITHUB_RUN_NUMBER $GITHUB_RUN_ID $GITHUB_REPOSITORY $GITHUB_REF
Test_Build:
env:
DISCORD_WEBHOOK_MERGE: ${{ secrets.DISCORD_WEBHOOK_MERGE}}
DISCORD_WEBHOOK_MODEL: ${{ secrets.DISCORD_WEBHOOK_MODEL}}
needs: Lint_Compliance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Initial build
run:
python .github/tests/tsv_to_sbml.py
- name: Failure handler
if: ${{ failure() }}
run:
python .github/tests/failure_reporter.py "$DISCORD_WEBHOOK_MERGE" $GITHUB_RUN_NUMBER $GITHUB_RUN_ID $GITHUB_REPOSITORY $GITHUB_REF
Model_Benchmark:
env:
DISCORD_WEBHOOK_MERGE: ${{ secrets.DISCORD_WEBHOOK_MERGE}}
DISCORD_WEBHOOK_MODEL: ${{ secrets.DISCORD_WEBHOOK_MODEL}}
needs: [Lint_Compliance,Test_Build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Benchmarking via MEMOTE
run: |
python .github/tests/tsv_to_sbml.py
python .github/tests/run_memote.py
- if: github.event_name == 'pull_request'
name: Report to Discord server
run: |
python .github/tests/result_web_gen.py
tar -czvf WormJam.tar.gz WormJam.xml
python .github/tests/send_reports.py "$DISCORD_WEBHOOK_MERGE" "$DISCORD_WEBHOOK_MODEL" $GITHUB_RUN_NUMBER $GITHUB_RUN_ID $GITHUB_REPOSITORY $GITHUB_REF
- if: github.event_name == 'pull_request' && ${{ failure() }}
name: Failure handler
run:
python .github/tests/failure_reporter.py "$DISCORD_WEBHOOK_MERGE" $GITHUB_RUN_NUMBER $GITHUB_RUN_ID $GITHUB_REPOSITORY $GITHUB_REF