Skip to content

Commit de9877c

Browse files
authored
add CI (#179)
1 parent 3155cda commit de9877c

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
ubuntu:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v5
8+
- run: sudo apt-get update && sudo apt-get install libhts-dev bcftools
9+
- run: echo /home/linuxbrew/.linuxbrew/bin >> $GITHUB_PATH
10+
- run: brew install nim
11+
- run: nimble test
12+
mac:
13+
runs-on: macos-latest
14+
steps:
15+
- uses: actions/checkout@v5
16+
- run: brew install nim htslib bcftools
17+
- run: sed -i "" -e "s/nim c/nim c --passL:-Wl,-rpath,\/opt\/homebrew\/opt\/htslib\/lib/" slivar.nimble
18+
- run: sed -i "" -e "s/nim c/nim c --passL:-Wl,-rpath,\/opt\/homebrew\/opt\/htslib\/lib/" tests/functional-tests.sh
19+
- run: nimble test

tests/functional-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ assert_exit_code 0
5050
run check_denovo $exe expr -v tests/ashk-trio.vcf.gz --js js/slivar-functions.js --pass-only --trio "denovo:kid.het && mom.hom_ref && dad.hom_ref && (mom.AD[1] + dad.AD[1]) < 2 && kid.GQ > 10 && mom.GQ > 10 && dad.GQ > 10 && kid.DP > 10 && mom.DP > 10 && dad.DP > 10" --ped tests/ashk-trio.ped -o xx.bcf
5151
assert_exit_code 0
5252
assert_equal 0 $(bcftools view -H -i 'FMT/GT[0] == "RR"' xx.bcf | wc -l)
53-
assert_equal "0" "$(bcftools view -H -i 'FMT/DP[0] <= 10 || FMT/DP[1] <= 10 || FMT/DP[2] <= 10' xx.bcf | wc -l)"
53+
assert_equal 0 $(bcftools view -H -i 'FMT/DP[0] <= 10 || FMT/DP[1] <= 10 || FMT/DP[2] <= 10' xx.bcf | wc -l)
5454
assert_equal 11 $(bcftools view -H xx.bcf | wc -l)
5555

5656

0 commit comments

Comments
 (0)