Skip to content

Commit b9f9f21

Browse files
authored
Merge pull request #3 from mendelics/tests
tests: run tests before release
2 parents fb1b29e + c86d7ad commit b9f9f21

File tree

9 files changed

+8
-18
lines changed

9 files changed

+8
-18
lines changed

.github/workflows/go.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ jobs:
1818
uses: actions/setup-go@v2
1919
with:
2020
go-version: 1.16
21+
-
22+
name: Test
23+
run: go test -v ./...
2124
-
2225
name: Run GoReleaser
2326
uses: goreleaser/goreleaser-action@v2

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
*.json
22
*.json.gz
3-
bin/coverage-*
3+
dist/

Makefile

Lines changed: 0 additions & 13 deletions
This file was deleted.

bin/_keep.txt

Whitespace-only changes.

coverage_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestCoveragePerGeneFromBed(t *testing.T) {
2020
}
2121

2222
for i, test := range tt {
23-
targets, _, _, _, _, _ := parseMosdepthBed("example_mosdepth_coverage.bed.gz")
23+
targets, _, _, _, _, _ := parseMosdepthBed("samples/example_mosdepth_coverage.bed.gz")
2424

2525
resultMap := getGeneCoverage(targets)
2626

@@ -71,7 +71,7 @@ func TestCoveragePerGeneFromVcf(t *testing.T) {
7171
}
7272

7373
for i, test := range tt {
74-
targets, _, _ := parseGatkVcf("example_gatk_coverage.vcf.gz")
74+
targets, _, _ := parseGatkVcf("samples/example_gatk_coverage.vcf.gz")
7575

7676
resultMap := getGeneCoverage(targets)
7777

gatk_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestParseCoverageVcf(t *testing.T) {
1818
var expected10x = 32369680
1919

2020
for i, test := range tt {
21-
resultMap, globalTotal, global10x := parseGatkVcf("example_gatk_coverage.vcf.gz")
21+
resultMap, globalTotal, global10x := parseGatkVcf("samples/example_gatk_coverage.vcf.gz")
2222

2323
if globalTotal != expectedGlobal {
2424
t.Errorf("expected globalTotal %d, got %d on test number %d", expectedGlobal, globalTotal, i)

mosdepth_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestParseCoverageBed(t *testing.T) {
2121
var expected30x = 34512655
2222

2323
for i, test := range tt {
24-
resultMap, globalTotal, global5x, global10x, global20x, global30x := parseMosdepthBed("example_mosdepth_coverage.bed.gz")
24+
resultMap, globalTotal, global5x, global10x, global20x, global30x := parseMosdepthBed("samples/example_mosdepth_coverage.bed.gz")
2525

2626
if globalTotal != expectedGlobal {
2727
t.Errorf("expected globalTotal %d, got %d on test number %d", expectedGlobal, globalTotal, i)
File renamed without changes.

0 commit comments

Comments
 (0)