-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (117 loc) · 3.3 KB
/
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
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
name: CI
on: push
jobs:
test-fast:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
# make orthohmm CLI available for tests
make install
# install deps for tests
pip install pytest
pip install pytest-cov
- name: Install HMMER
run: |
brew install hmmer
- name: Install MCL
run: |
mkdir installmcl
cd installmcl
wget https://raw.githubusercontent.com/micans/mcl/main/install-this-mcl.sh -o install-this-mcl
chmod u+x install-this-mcl.sh
./install-this-mcl.sh
PATH=$PATH:$HOME/local/bin
mcl --version
cd ..
- name: Run tests
run: |
PATH=$PATH:$HOME/local/bin
make test.fast
test-full:
runs-on: macos-latest
env:
PYTHON: '3.9'
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install -r requirements.txt
# make orthohmm CLI available for tests
make install
# install test dependencies
pip install pytest
pip install pytest-cov
- name: Install HMMER
run: |
brew install hmmer
- name: Install MCL
run: |
mkdir installmcl
cd installmcl
wget https://raw.githubusercontent.com/micans/mcl/main/install-this-mcl.sh -o install-this-mcl
chmod u+x install-this-mcl.sh
./install-this-mcl.sh
PATH=$PATH:$HOME/local/bin
mcl --version
cd ..
- name: Generate coverage report
run: |
PATH=$PATH:$HOME/local/bin
make test.coverage
- name: Upload unit test coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./unit.coverage.xml
flags: unit
env_vars: PYTHON
name: codecov-unit
fail_ci_if_error: false
- name: Upload integration test coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./integration.coverage.xml
flags: integration
env_vars: PYTHON
name: codecov-integration
fail_ci_if_error: false
docs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "docs/uv.lock"
- name: Build docs
run: |
cd docs
uv python install
uv sync --all-extras --dev
uv run python -m sphinx.cmd.build -b html . ./_build/html
cd ..
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/_build/html