From 24bcfd069b5546f8bd833446183a0851210cb99e Mon Sep 17 00:00:00 2001 From: Jay Ehsaniara Date: Sat, 28 May 2022 00:24:31 -0700 Subject: [PATCH] GitHub action fix --- .github/workflows/go.yml | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f869ba3..4cfdac2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -8,18 +8,33 @@ on: jobs: - build: + container-job: + runs-on: ubuntu-latest + + services: + + redis: + # Docker Hub image + image: redis + # Set health checks to wait until redis has started + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 6379:6379 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.17 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 - - name: Build - run: go build -v ./... + - name: Build + run: go build -v ./... - - name: Test - run: go test -v ./... + - name: Test + run: go test ./... -RedisHost localhost:6379