-
Notifications
You must be signed in to change notification settings - Fork 1
99 lines (93 loc) · 3.22 KB
/
sphinx.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
name: "QSAR CI/CD Pipeline"
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
release:
types: [ created ]
permissions:
contents: write
jobs:
lint-and-static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pylint black isort
- name: Run Linters and Static Analysis
continue-on-error: true
run: |
flake8 qsar/ tests/
pylint qsar/ tests/
black qsar/ tests/ --check
isort qsar/ tests/ --check-only
unit-tests-and-coverage:
needs: lint-and-static-analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "requirements.txt"
- name: Run unit tests with pytest
run: |
pip install pytest pytest-cov
pytest tests/ --cov=qsar --cov-report=xml --cov-report=html
security-scan:
needs: unit-tests-and-coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Safety
run: |
pip install safety
- name: Run Safety to check dependencies for security vulnerabilities
continue-on-error: true
run: |
safety check
build-deploy-docs:
needs: security-scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "requirements.txt"
- name: Sphinx build
run: |
sphinx-build docs _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true