Skip to content

Commit 00cfe15

Browse files
authored
Merge pull request #257 from mayankshah1607/mayank/darwin-ut
CI: enable unit tests for MacOS
2 parents 1e76dfa + bff4f88 commit 00cfe15

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

.github/workflows/darwin.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: MacOS Build & Unit Test
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: macos-latest
11+
steps:
12+
- name: Set up Go 1.x
13+
uses: actions/setup-go@v2
14+
with:
15+
go-version: ^1.13
16+
id: go
17+
- name: Check out code into the Go module directory
18+
uses: actions/checkout@v2
19+
- name: Build Test
20+
run: |
21+
make blob-darwin
22+
- name: Run unit tests on MacOS
23+
run: go test -v -race ./pkg/...

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Linux tests
1+
name: Linux Tests
22
on:
33
push:
44
branches: [ master ]

.github/workflows/windows.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Windows Test
1+
name: Windows Tests
22
on:
33
push:
44
branches: [ master ]
@@ -20,4 +20,4 @@ jobs:
2020
uses: actions/checkout@v2
2121
- name: Run Windows Unit Tests
2222
run: |
23-
go test -v -race ./pkg/...
23+
go test -v -race ./pkg/...

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ blob:
8585
blob-windows:
8686
CGO_ENABLED=0 GOOS=windows go build -a -ldflags ${LDFLAGS} -o _output/blobplugin.exe ./pkg/blobplugin
8787

88+
.PHONT: blob-darwin
89+
blob-darwin:
90+
CGO_ENABLED=0 GOOS=darwin go build -a -ldflags ${LDFLAGS} -o _output/blobplugin ./pkg/blobplugin
91+
8892
.PHONY: container
8993
container: blob
9094
docker build --no-cache -t $(IMAGE_TAG) -f ./pkg/blobplugin/dev.Dockerfile .

0 commit comments

Comments
 (0)