Skip to content

adopt OpenTelemetry #74

adopt OpenTelemetry

adopt OpenTelemetry #74

Workflow file for this run

name: Run unit tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis:16-3.4-alpine
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: secret
POSTGRES_DB: eenergy
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.21
id: go
- name: Run migrations
run: make migrateup
- name: Run Unit tests
run: make testci
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=covprofile -service=github