Skip to content

Commit ca4dd91

Browse files
committed
chore(CI): add nats as service
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent c0c723c commit ca4dd91

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

.github/workflows/go.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,10 @@ jobs:
1919

2020
# Service containers to run with `container-job`
2121
services:
22-
# Label used to access the service container
23-
redis:
24-
# Docker Hub image
25-
image: redis
26-
# Set health checks to wait until redis has started
27-
options: >-
28-
--health-cmd "redis-cli ping"
29-
--health-interval 10s
30-
--health-timeout 5s
31-
--health-retries 5
22+
nats:
23+
image: nats
3224
ports:
33-
# Maps port 6379 on service container to the host
34-
- 6379:6379
35-
36-
nsq:
37-
image: nsqio/nsq
38-
ports:
39-
# Maps port 6379 on service container to the host
40-
- 4150:4150
25+
- 4222:4222
4126

4227
env:
4328
GO111MODULE: on
@@ -58,3 +43,10 @@ jobs:
5843
uses: golangci/golangci-lint-action@v2
5944
with:
6045
version: v1.41.1
46+
47+
- name: Run Tests
48+
run: |
49+
go test -v -covermode=atomic -coverprofile=coverage.out .
50+
51+
- name: Upload coverage to Codecov
52+
uses: codecov/codecov-action@v1

0 commit comments

Comments
 (0)