File tree Expand file tree Collapse file tree 3 files changed +78
-6
lines changed Expand file tree Collapse file tree 3 files changed +78
-6
lines changed Original file line number Diff line number Diff line change
1
+ name : Run CI Lint
2
+ on : push
3
+
4
+ jobs :
5
+ test :
6
+ strategy :
7
+ matrix :
8
+ os : [ubuntu-latest, macos-latest]
9
+ go : [1.16, 1.17]
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.42.0
Original file line number Diff line number Diff line change
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
+ # Label used to access the service container
13
+ redis :
14
+ # Docker Hub image
15
+ image : redis
16
+ # Set health checks to wait until redis has started
17
+ options : >-
18
+ --health-cmd "redis-cli ping"
19
+ --health-interval 10s
20
+ --health-timeout 5s
21
+ --health-retries 5
22
+ ports :
23
+ - 6379:6379
24
+
25
+ env :
26
+ GO111MODULE : on
27
+ GOPROXY : https://proxy.golang.org
28
+ steps :
29
+ - name : Set up Go ${{ matrix.go }}
30
+ uses : actions/setup-go@v2
31
+
32
+ - name : Checkout Code
33
+ uses : actions/checkout@v2
34
+ with :
35
+ ref : ${{ github.ref }}
36
+
37
+ - name : Run Tests
38
+ run : |
39
+ go test -v -covermode=atomic -coverprofile=coverage.out .
40
+
41
+ - name : Upload coverage to Codecov
42
+ uses : codecov/codecov-action@v1
Original file line number Diff line number Diff line change @@ -30,12 +30,11 @@ type Worker struct {
30
30
channel string
31
31
channelSize int
32
32
33
- stopOnce sync.Once
34
- stop chan struct {}
35
- runFunc func (context.Context , queue.QueuedMessage ) error
36
- logger queue.Logger
37
- stopFlag int32
38
- startFlag int32
33
+ stopOnce sync.Once
34
+ stop chan struct {}
35
+ runFunc func (context.Context , queue.QueuedMessage ) error
36
+ logger queue.Logger
37
+ stopFlag int32
39
38
}
40
39
41
40
// WithAddr setup the addr of NSQ
You can’t perform that action at this time.
0 commit comments