Skip to content

chore(go.mod): 🔧 update Go version to 1.26 #2

chore(go.mod): 🔧 update Go version to 1.26

chore(go.mod): 🔧 update Go version to 1.26 #2

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Go Tests (PG ${{ matrix.postgres }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
postgres: ["16", "17", "18"]
services:
postgres:
image: postgres:${{ matrix.postgres }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Unit tests
run: go test ./...
- name: E2E tests
env:
PGHOST: 127.0.0.1
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: postgres
run: go test ./e2e -v -count=1
- name: Test coverage
env:
PGHOST: 127.0.0.1
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: postgres
run: |
go test -coverpkg=./... ./... -coverprofile=coverage.out -covermode=atomic
coverage=$(go tool cover -func=coverage.out | awk '/total:/ {print $3}' | sed 's/%//')
echo "Coverage: ${coverage}%"