-
Notifications
You must be signed in to change notification settings - Fork 42
115 lines (98 loc) · 2.77 KB
/
ci_tools.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
name: Uni-Dock Tools CI/CD
on:
push:
branches: [ fix_unidock_ut ]
pull_request:
branches: [ main ]
jobs:
flake8:
continue-on-error: true
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Run flake8 formating
run: |
flake8 unidock_tools/unidock_tools --exit-zero
pylint:
continue-on-error: true
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Run pylint formating
run: |
pylint unidock_tools/unidock_tools --exit-zero
mypy:
continue-on-error: true
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy
- name: Run mypy check
id: mypy_check
run: |
mypy unidock_tools/unidock_tools --ignore-missing-imports
ut:
if: ${{ always() }}
needs: [flake8, pylint]
runs-on: nvidia
strategy:
matrix:
python-version: ["3.9"]
container:
image: docker.io/dptechnology/unidock:latest
options: --gpus all
steps:
- name: checkout repo
uses: actions/checkout@v3
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
- name: install dependency
run: |
conda create -n mgltools mgltools -c bioconda -y
conda install -n test -c conda-forge -y openbabel
conda run -n test pip install --upgrade pip
conda run -n test pip install pytest
- name: install package
working-directory: ./unidock_tools
run: |
export PATH=/__w/Uni-Dock/Uni-Dock/3/envs/test/bin:$PATH
python setup.py install
- name: perform unit-test
run: |
export PATH=/__w/Uni-Dock/Uni-Dock/3/envs/test/bin:$PATH
pytest unidock_tools/tests/ut -v