Skip to content

Commit f1b322d

Browse files
add github action to run tests
1 parent e3d926e commit f1b322d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ jobs:
6666
cache: true
6767

6868
- name: Build
69-
run: go build -v ./...
69+
run: |
70+
# Build all packages except example (has multiple main functions)
71+
go build -v $(go list ./... | grep -v '/example')
7072
7173
- name: Test compilation
7274
run: |
73-
go test -c -o /dev/null ./...
75+
# Test compilation for all packages except example
76+
go list ./... | grep -v '/example' | xargs -I {} go test -c -o /dev/null {}
7477

0 commit comments

Comments
 (0)