Skip to content

Go

Go #757

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
pull_request:
merge_group:
schedule:
- cron: '0 0 * * *'
jobs:
build:
strategy:
matrix:
postgres-version: ['latest', 16, 15, 14, 13, 12]
go-version: ['stable','oldstable']
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: ${{ matrix.go-version }}
- name: golangci-lint cache
uses: actions/cache@v4
with:
path: ~/go/bin/golangci-lint
key: ${{ runner.os }}-${{ matrix.go-version }}-golangci-lint-v1.60.1
- name: Test
run: |
make linters test
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage_${{ matrix.go-version }}_${{ matrix.postgres-version }}
path: coverage.html