mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-10-23 06:47:26 +00:00
Improve stats gathering (#9)
This commit is contained in:
+54
-55
@@ -16,67 +16,66 @@ env:
|
|||||||
GO_VERSION: ">=1.21"
|
GO_VERSION: ">=1.21"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
jobs:
|
# This job is responsible for preparation of the build
|
||||||
# This job is responsible for preparation of the build
|
# environment variables.
|
||||||
# environment variables.
|
prepare:
|
||||||
prepare:
|
name: Preparing build context
|
||||||
name: Preparing build context
|
runs-on: ubuntu-latest
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
go-version: ${{env.GO_VERSION}}
|
go-version: ${{env.GO_VERSION}}
|
||||||
cache-dependency-path: "**/*.sum"
|
cache-dependency-path: "**/*.sum"
|
||||||
|
|
||||||
- name: Go get dependencies
|
- name: Go get dependencies
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
go get ./...
|
go get ./...
|
||||||
|
|
||||||
# This job is responsible for running tests and linting the codebase
|
# This job is responsible for running tests and linting the codebase
|
||||||
test:
|
test:
|
||||||
name: "Unit testing"
|
name: "Unit testing"
|
||||||
# needs: [prepare]
|
# needs: [prepare]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# container: github/super-linter:v4
|
# container: github/super-linter:v4
|
||||||
needs: [prepare]
|
needs: [prepare]
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# Label used to access the service container
|
# Label used to access the service container
|
||||||
redis:
|
redis:
|
||||||
# Docker Hub image
|
# Docker Hub image
|
||||||
image: redis
|
image: redis
|
||||||
# Set health checks to wait until redis has started
|
# Set health checks to wait until redis has started
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd "redis-cli ping"
|
--health-cmd "redis-cli ping"
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ${{env.GO_VERSION}}
|
go-version: ${{env.GO_VERSION}}
|
||||||
cache-dependency-path: "**/*.sum"
|
cache-dependency-path: "**/*.sum"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
env:
|
env:
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
REDIS_PORT: 6379
|
REDIS_PORT: 6379
|
||||||
run: |
|
run: |
|
||||||
export REDIS_SERVER="$REDIS_HOST:$REDIS_PORT"
|
export REDIS_SERVER="$REDIS_HOST:$REDIS_PORT"
|
||||||
CI_RUN=${CI} make test
|
CI_RUN=${CI} make test
|
||||||
|
|||||||
Reference in New Issue
Block a user