-
Notifications
You must be signed in to change notification settings - Fork 1
145 lines (124 loc) · 3.57 KB
/
tests.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
ruff:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- run: "pip install -e '.[dev]'"
- run: ruff check .
mypy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- run: "pip install -e '.[dev]'"
- run: mypy src
ruff-format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- run: "pip install -e '.[dev]'"
- run: ruff format --check .
pytest:
# https://ericmjl.github.io/blog/2021/12/30/better-conda-environments-on-github-actions/
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniforge-variant: Mambaforge
channels: conda-forge,defaults
python-version: 3.11
activate-environment: pytest
use-mamba: true
- name: Build environment
run: |
conda activate pytest
conda install -c conda-forge openmm openmmtools
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install -e '.[dev]'
- name: pytest
run: pytest
build-test:
# https://ericmjl.github.io/blog/2021/12/30/better-conda-environments-on-github-actions/
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniforge-variant: Mambaforge
channels: conda-forge,defaults
python-version: 3.11
activate-environment: buildtest
use-mamba: true
- name: Build environment
run: |
conda activate buildtest
conda install -c conda-forge openmm openmmtools
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install -e '.[dev]'
- name: Clone repo
run: git clone https://github.com/andrewtarzia/cg_model_test --depth 1
- name: Run script
run: python cg_model_test/cg_model_test.py cg_model_test
- name: Run parameteriser script
run: python cg_model_test/openmm_parametizer.py cg_model_test
- uses: actions/upload-artifact@v3
with:
name: parity-plot
path: parity.png
- uses: actions/upload-artifact@v3
with:
name: l1-plot
path: l1.png
- uses: actions/upload-artifact@v3
with:
name: l3-plot
path: l3.png
- uses: actions/upload-artifact@v3
with:
name: l4-plot
path: l4.png
- uses: actions/upload-artifact@v3
with:
name: l5-plot
path: l5.png
- uses: actions/upload-artifact@v3
with:
name: uff-plot
path: uff_angle_test.png
- uses: actions/upload-artifact@v3
with:
name: uff2-plot
path: uff_angle_test2.png
- uses: actions/upload-artifact@v3
with:
name: rt-plot
path: random_test.png