Skip to content

Commit

Permalink
Create go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrkowalczuk authored Jan 16, 2024
1 parent df97f08 commit 3ac55e9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Test
run: go test -race -count=2 -v ./...
env:
PQT_POSTGRES_ADDRESS: postgres://postgres:postgres@postgres:5432/postgres?sslmode=disable

0 comments on commit 3ac55e9

Please sign in to comment.