Skip to content

feat: add prometheus metrics #16

feat: add prometheus metrics

feat: add prometheus metrics #16

Workflow file for this run

name: test
on:
workflow_call:
push:
branches:
- "*"
- "!main"
env:
PSQLQUEUE_TEST_DATABASE_URL: "postgres://psqlqueue:[email protected]:5432/psqlqueue-test?sslmode=disable"
PSQLQUEUE_TESTING: "true"
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_DB: psqlqueue-test
POSTGRES_USER: psqlqueue
POSTGRES_PASSWORD: psqlqueue
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
go-version: "1.21"
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Get dependencies
run: go mod download
- name: Create default dotenv for testing
run: cp env.sample .env
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
- name: Run Database Migration
run: make run-migration
- name: Run Tests
run: make test