Skip to content

Commit

Permalink
Updated pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
vgarvardt committed May 13, 2021
1 parent 1429524 commit 3a3a74c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
with:
version: v1.33
uses: golangci/golangci-lint-action@v2

test:
name: Test
runs-on: ubuntu-latest
needs: [lint]
needs: [ lint ]

services:
pg-pq:
Expand Down Expand Up @@ -62,6 +58,11 @@ jobs:
ports:
- "5672"
- "15672"
options: >-
--health-cmd "rabbitmqctl status"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:3.2-alpine
Expand All @@ -77,6 +78,11 @@ jobs:
image: mongo:3
ports:
- "27017"
options: >-
--health-cmd "mongo localhost:27017/test --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:5.7
Expand Down Expand Up @@ -105,7 +111,6 @@ jobs:
ports:
- "11211"


steps:
- name: Set up Go
uses: actions/setup-go@v2
Expand All @@ -124,10 +129,3 @@ jobs:
HEALTH_GO_MS_DSN: test:test@tcp(localhost:${{ job.services.mysql.ports[3306] }})/test?charset=utf8
HEALTH_GO_HTTP_URL: http://localhost:${{ job.services.http.ports[8080] }}/status
HEALTH_GO_MD_DSN: memcached://localhost:${{ job.services.memcached.ports[11211] }}/

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
if: success()
with:
file: ./coverage.txt
fail_ci_if_error: false
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# health-go
[![Go Report Card](https://goreportcard.com/badge/github.com/hellofresh/health-go)](https://goreportcard.com/report/github.com/hellofresh/health-go)
[![Go Doc](https://godoc.org/github.com/hellofresh/health-go?status.svg)](https://godoc.org/github.com/hellofresh/health-go)
[![Coverage Status](https://codecov.io/gh/hellofresh/health-go/branch/master/graph/badge.svg)](https://codecov.io/gh/hellofresh/health-go)

* Exposes an HTTP handler that retrieves health status of the application
* Implements some generic checkers for the following services:
Expand All @@ -18,7 +17,8 @@

The library exports `Handler` and `HandlerFunc` functions which are fully compatible with `net/http`.

Additionally, library exports `Measure` function that returns summary status for all the registered health checks, so it can be used in non-HTTP environments.
Additionally, library exports `Measure` function that returns summary status for all the registered health checks,
so it can be used in non-HTTP environments.

### Handler

Expand Down

0 comments on commit 3a3a74c

Please sign in to comment.