Skip to content

Commit 2c55b0f

Browse files
committed
split unit and integration tests runs
This allows running unit tests without sudo.
1 parent ac741c8 commit 2c55b0f

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed

.github/workflows/go.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,14 @@ jobs:
3434
- name: Build
3535
run: go build -v .
3636

37+
- name: Unit tests
38+
run: go test -v -coverprofile=coverage_unit.txt -covermode=atomic .
39+
3740
- name: Integration test
3841
# The test need sudo to be able to mount/umount
39-
run: sudo go test -v --tags=integration -coverprofile=coverage.txt -covermode=atomic .
42+
run: sudo go test -v --tags=integration -coverprofile=coverage_integration.txt -covermode=atomic .
4043

4144
- name: Upload coverage to Codecov
4245
uses: codecov/codecov-action@v2
46+
with:
47+
files: ./coverage_unit.txt,coverage_integration.txt

image_reader_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !integration
2+
// +build !integration
3+
14
package iso9660
25

36
import (

image_writer_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !integration
2+
// +build !integration
3+
14
package iso9660
25

36
import (

iso9660_datatypes_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !integration
2+
// +build !integration
3+
14
package iso9660
25

36
import (

iso9660_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !integration
2+
// +build !integration
3+
14
package iso9660
25

36
import (

0 commit comments

Comments
 (0)