-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (62 loc) · 2.11 KB
/
python-test.yml
File metadata and controls
71 lines (62 loc) · 2.11 KB
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
name: BarcodeForge CI
on:
push:
branches: [ main ]
pull_request:
permissions:
contents: read
jobs:
testsuite:
name: Test Package (Python ${{ matrix.python-version }} | ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
steps:
# Downloads a copy of the code in your repository before running CI tests
- name: Check out repository code
uses: actions/checkout@v6
- name: Setup for conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: bioconda,conda-forge
channel-priority: true
python-version: ${{ matrix.python-version }}
activate-environment: test
- name: Install
shell: bash -l {0}
run: |
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
conda config --add channels bioconda
conda config --add channels conda-forge
conda install usher ucsc-fatovcf -y
pip install '.[dev-requirements,test-requirements]'
- name: Test
shell: bash -l {0}
run: |
conda activate test
pytest -vvv --tb=short
- name: Run barcode generation test
shell: bash -l {0}
run: |
barcodeforge --debug barcode barcodeforge/assets/reference.fasta barcodeforge/assets/aligned.fasta barcodeforge/assets/tree.nwk barcodeforge/assets/lineages.tsv --matutils-overlap 0.8 --threads 4 --prefix RSVa
diff -q RSVa-barcode.csv barcodeforge/assets/RSVa-barcode.csv || (echo "Files are not identical!" && exit 1)
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black
- name: Lint with Black
run: |
black --check .