Skip to content

Commit b66999d

Browse files
committed
chore: Add nsq service for testing
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent e5f2fd2 commit b66999d

File tree

5 files changed

+67
-101
lines changed

5 files changed

+67
-101
lines changed

.drone.yml

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

.github/workflows/go.yml

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

.github/workflows/lint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run CI Lint
2+
on: push
3+
4+
jobs:
5+
test:
6+
strategy:
7+
matrix:
8+
os: [ubuntu-latest]
9+
go: [1.13, 1.14, 1.15, 1.16]
10+
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
11+
runs-on: ${{ matrix.os }}
12+
13+
env:
14+
GO111MODULE: on
15+
TESTTAGS: ${{ matrix.test-tags }}
16+
GOPROXY: https://proxy.golang.org
17+
steps:
18+
- name: Set up Go ${{ matrix.go }}
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: ${{ matrix.go }}
22+
23+
- name: Checkout Code
24+
uses: actions/checkout@v2
25+
with:
26+
ref: ${{ github.ref }}
27+
28+
- name: golangci-lint
29+
uses: golangci/golangci-lint-action@v2
30+
with:
31+
version: v1.41.1

.github/workflows/testing.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Run Testing
2+
on: push
3+
4+
jobs:
5+
# Label of the container job
6+
runner-job:
7+
# You must use a Linux environment when using service containers or container jobs
8+
runs-on: ubuntu-latest
9+
10+
# Service containers to run with `container-job`
11+
services:
12+
nsqd:
13+
image: appleboy/nsqd
14+
ports:
15+
- 4150:4150
16+
- 4151:4151
17+
18+
env:
19+
GO111MODULE: on
20+
GOPROXY: https://proxy.golang.org
21+
steps:
22+
- name: Set up Go ${{ matrix.go }}
23+
uses: actions/setup-go@v2
24+
25+
- name: Checkout Code
26+
uses: actions/checkout@v2
27+
with:
28+
ref: ${{ github.ref }}
29+
30+
- name: Run Tests
31+
run: |
32+
go test -v -covermode=atomic -coverprofile=coverage.out .
33+
34+
- name: Upload coverage to Codecov
35+
uses: codecov/codecov-action@v1

nsq_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/stretchr/testify/assert"
1515
)
1616

17-
var host = "nsq"
17+
var host = "127.0.0.1"
1818

1919
type mockMessage struct {
2020
Message string

0 commit comments

Comments
 (0)