-
Notifications
You must be signed in to change notification settings - Fork 16
139 lines (113 loc) · 4.8 KB
/
fuzzy_compile_weekly.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
name: Fuzzy Compile
# The runtime of fuzzy compile can vary wildly, depending on whether the
# randomly chosen subschema is a CommandLineTool, a small workflow, or a
# complex workflow. So instead of running it on every push, do it on a schedule.
on:
# push: # Do NOT run fuzzy compile on every push!
# pull_request: (either on origin or on upstream pull request)
schedule:
# Instead, run it every Wednesday at midnight.
- cron: '0 0 * * 3'
workflow_dispatch:
defaults:
run:
shell: bash -l {0} # Invoke bash in login mode, NOT interactive mode.
# This will cause bash to look for the startup file ~/.bash_profile, NOT ~/.bashrc
# This is important since conda init writes to ~/.bashrc
permissions:
actions: read
contents: read
pull-requests: read
jobs:
fuzzy_compile:
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
# This will prevent DOS attacks from people blasting the CI with rapid fire commits.
concurrency:
group: ${{ github.workflow }}-fuzzy-compile-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
runs-on: [self-hosted, linux]
steps:
- name: Checkout sophios
if: always()
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/sophios
ref: master
path: sophios
- name: Checkout biobb_adapters
if: always()
uses: actions/checkout@v3
with:
repository: vjaganat90/biobb_adapters
ref: master
path: biobb_adapters
- name: Checkout mm-workflows
if: always()
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/mm-workflows
ref: main
path: mm-workflows
- name: Checkout image-workflows
if: always()
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/image-workflows
ref: main
path: image-workflows
- name: Setup miniforge (linux, macos)
if: runner.os != 'Windows'
uses: conda-incubator/setup-miniconda@v3.0.1
with:
miniforge-variant: Miniforge3
miniforge-version: 24.7.1-2
environment-file: sophios/install/system_deps.yml
activate-environment: wic
channels: conda-forge
python-version: "3.9.*" # pypy is not yet compatible with 3.10 and 3.11
- name: Install Workflow Inference Compiler
if: always()
run: cd sophios/ && pip install ".[all_except_runner_src]"
- name: Install Molecular Modeling Workflows
if: always()
# Also run mm-workflows command to generate
# mm-workflows/autogenerated/schemas/config_schemas.json
# NOTE: Use ".[test]" instead of ".[all_except_runner_src]"
# We do not want or need to install the workflow_deps extra.
# (Many of the packages conflict with pypy.)
run: cd mm-workflows/ && pip install ".[test]" && mm-workflows --generate_schemas
- name: Generate Sophios Python API Workflows (*.py -> *.wic)
if: always()
run: cd sophios/ && python -c 'import sophios; import sophios.plugins; sophios.plugins.blindly_execute_python_workflows()'
- name: Generate Sophios Validation Jsonschema
if: always()
run: cd sophios/ && sophios --generate_schemas
# Please read docs/validation.md#Property-Based-Testing
# This is essentially an integration test for all of the
# WIC Python API workflows as well as the WIC Python API itself.
- name: Validate Sophios Python API Workflows (*.py -> *.wic)
if: always()
run: cd sophios/ && python -c 'import sophios; import sophios.plugins; sophios.plugins.blindly_execute_python_workflows()'
# Since a randomly chosen subschema is used every time, repeat 10X for more coverage.
- name: PyTest Fuzzy Compile
run: cd sophios/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd sophios/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd sophios/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd sophios/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd sophios/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd sophios/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd sophios/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd sophios/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd sophios/ && pytest -k test_fuzzy_compile
- name: PyTest Fuzzy Compile
run: cd sophios/ && pytest -k test_fuzzy_compile