Skip to content

Pulling feat/action-workflow into develop #125

Pulling feat/action-workflow into develop

Pulling feat/action-workflow into develop #125

Workflow file for this run

name: Test coverage
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:9.6.6-alpine
env:
POSTGRES_DB: pgtest
POSTGRES_USER: pguser
POSTGRES_PASSWORD: pgdocker
ports:
- 5432/tcp
steps:
- name: set up golang
uses: actions/setup-go@v4
with:
go-version: '~1.20.6'
- name: check out code
uses: actions/checkout@v3
- name: unit test
run: go test -covermode=atomic -coverprofile=profile.cov -v ./...
env:
POSTGRES_DB: pgtest
POSTGRES_USER: pguser
POSTGRES_PASSWORD: pgdocker
POSTGRES_HOST: localhost
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
NATS_HOST: localhost
NATS_PORT: ${{ job.services.nats.ports[4222] }}
GOPROXY: https://proxy.golang.org
- name: upload coverage to codecov
uses: codecov/codecov-action@v3
with:
file: ./profile.cov