forked from CDDLeiden/QSPRpred
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
56 lines (50 loc) · 1.86 KB
/
.gitlab-ci.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
# This workflow will install Python dependencies, run tests, and write documentation
variables:
GIT_STRATEGY: clone # clone entire repo instead of reusing workspace
GIT_DEPTH: "0" # avoid shallow clone to give sonar all the info it needs
stages:
- test
- deploy
# Install python dependencies and run python tests with pytest and the CLI test script
.test:
stage: test
before_script:
- python --version # For debugging python version
- wget http://www.clustal.org/omega/clustalo-1.2.4-Ubuntu-x86_64 -O clustalo && chmod +x clustalo
- wget https://mafft.cbrc.jp/alignment/software/mafft-7.520-linux.tgz -O mafft.tgz && tar -xzvf mafft.tgz && chmod +x mafft-linux64/mafftdir/bin/mafft
- export PATH=$PATH:$PWD/mafft-linux64/mafftdir/bin/:$PWD
- export MAFFT_BINARIES=$PWD/mafft-linux64/mafftdir/libexec/
- clustalo --version # For debugging clustalo version
- mafft --version # For debugging mafft version
- python -m pip install ".[full]" --no-cache-dir
- python -c "import qsprpred; print(qsprpred.__version__)" # For debugging package version
- python -m pip install pytest
- python -m pip install jupyterlab
- python -m pip freeze # For debugging environment
script:
- pytest qsprpred
- cd clitest && ./run.sh
- cd ../tutorial && ./run_all.sh
# # Run tests on Python version 11 (linux image)
# test:python3.11:
# extends: .test
# image: python:3.11
# Run tests on Python version 10 (linux image)
test:python3.10:
extends: .test
image: python:3.10
# Write documentation on main branch
pages:
stage: deploy
image: python:3.10
before_script:
- python -m pip install -U sphinx
- python -m pip install sphinx-rtd-theme
script:
- mkdir public
- sphinx-build -b html ./docs public
artifacts:
paths:
- public
only:
- main