forked from SysBioChalmers/yeast-GEM
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.67 KB
/
memote-history.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
name: memote history
on: push
jobs:
memote-history:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# MEMOTE wants to fetch all branches
with:
fetch-depth: 0
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install memote
run: pip install -r code/requirements/ci-requirements.txt
- name: Checkout repo for gh-pages branch
uses: actions/checkout@v3
with:
repository: ${{ github.repository }}
ref: gh-pages
path: gh-pages-repo
# - name: Convert model
# run: |
# touch .env
# python -c 'import code.io as io; model = io.read_yeast_model(make_bigg_compliant=True); io.write_yeast_model(model)'
- name: Memote short run
run: |
memote run --ignore-git --skip-unchanged --solver-timeout 30
- name: Compute Memote history on push
run: |
# Generate the history report on the deployment branch
git config --global user.name "memote-bot"
memote report history --filename="gh-pages-repo/history_report.html"
- name: Fetch async changes in gh-pages
run: |
cd gh-pages-repo
git pull
- name: Auto-commit results
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: memote-bot
commit_message: "chore: update memote history report"
file_pattern: history_report.html
branch: gh-pages
repository: gh-pages-repo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}