Skip to content

Upgrade to Go 1.27, modernize code, and standardize CI badges (#46) #74

Upgrade to Go 1.27, modernize code, and standardize CI badges (#46)

Upgrade to Go 1.27, modernize code, and standardize CI badges (#46) #74

Workflow file for this run

name: Build & Test
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17-alpine
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
FMSG_TEST_DATABASE_URL: postgres://postgres@localhost:5432/postgres?sslmode=disable
steps:
- uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.27.x"
- name: Build
run: go build ./...
- name: Test
run: |
FMSG_TEST_DD="$(go list -m -f '{{.Dir}}' github.com/markmnl/fmsgd)/dd.sql" go test -race ./...
- name: Vet
run: go vet ./...