Skip to content

Go

Go #254

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * *'
jobs:
build:
strategy:
matrix:
postgres-version: [16, 15, 14, 13, 12]
runs-on: ubuntu-latest
services:
postgres:
image: postgres:${{ matrix.postgres-version }}
ports:
- "5432:5432"
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: everyone
POSTGRES_DB: postgres
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Test
run: |
PGQUEUE_TEST_DSN="postgres://postgres:everyone@localhost:5432/postgres?sslmode=disable" go test -coverprofile=coverage.out -shuffle on -v -run=. -bench=.
go tool cover -html=coverage.out -o coverage.html
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage_${{ matrix.postgres-version }}
path: coverage.html