Skip to content

Commit d2b10ad

Browse files
committed
add github ci
1 parent dcbd112 commit d2b10ad

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
pull_request:
7+
branches: [ master, main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup Miniconda
20+
uses: conda-incubator/setup-miniconda@v3
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
activate-environment: test-env
24+
auto-activate-base: false
25+
26+
- name: Install conda dependencies
27+
shell: bash -l {0}
28+
run: |
29+
conda install -c bioconda cyvcf2
30+
conda install pytest
31+
32+
- name: Install package
33+
shell: bash -l {0}
34+
run: |
35+
pip install '.'
36+
37+
- name: Run tests
38+
shell: bash -l {0}
39+
run: |
40+
pytest
41+
python -m peddy -h
42+
pwd
43+
python -m peddy --plot data/ceph1463.peddy.vcf.gz data/ceph1463.ped
44+
45+
- name: Install htslib and test with chr-prefixed VCF
46+
shell: bash -l {0}
47+
run: |
48+
conda install -c bioconda htslib
49+
zcat data/ceph1463.peddy.vcf.gz | awk 'BEGIN{FS=OFS="\t"}{ if ($1 !~ /^#/){ $0="chr"$0 } print $0; }' | sed -e 's/contig=<ID=/contig=<ID=chr/' | bgzip -c > chr.vcf.gz
50+
tabix chr.vcf.gz
51+
python -m peddy chr.vcf.gz data/ceph1463.ped 2>e.log; tail e.log

0 commit comments

Comments
 (0)