-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (64 loc) · 2.08 KB
/
memote.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
name: SYN memote tracking
on:
push:
branches: [ "main", "add_missing_rxns"]
jobs:
memote-history:
runs-on: ubuntu-latest
steps:
- name: Checkout model
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout concerto
uses: actions/checkout@v2
with:
repository: PNNL-CompBio/CONCERTO
path: 'concerto_path'
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.10.6'
- name: Install memote
run: pip install memote cobra
- name: Setup variables
id: setup
run: |
echo "snapshot=snapshot_report.html" >> $GITHUB_ENV
echo "history=history_report.html" >> $GITHUB_ENV
echo "deployment=gh-pages" >> $GITHUB_ENV
echo "custom_tests=syn_elong/custom_tests" >> $GITHUB_ENV
echo "MEMOTE_LOCATION=results" >> $GITHUB_ENV
echo "PYTHONPATH=$PYTHONPATH:concerto_path" >> $GITHUB_ENV
ls
pwd
- name: Memote short run
run: |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
git checkout gh-pages
git checkout ${{ github.ref_name }}
memote run --custom-tests=${{ env.custom_tests }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Compute Memote history on push
run: |
git checkout gh-pages
# Generate the history report on the deployment branch
memote report history --filename="${{ env.history }}"
- name: Memote run
run: |
git checkout ${{ github.ref_name }}
memote report snapshot \
--filename="${{ env.snapshot }}" \
--custom-tests=${{ env.custom_tests }}
- name: Auto-commit results
uses: stefanzweifel/git-auto-commit-action@v4.4.0
with:
commit_user_name: memote-bot
commit_message: "chore: update memote history report"
file_pattern: "*_report.html"
branch: gh-pages
repository: .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}