updated pgq logo and fixed readme typo #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: write | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "test" | |
test: | |
name: test | |
strategy: | |
matrix: | |
# version must be string, otherwise it will be converted to float | |
# and the trailing zero will be removed. 1.20 -> 1.2 | |
go-version: [ "1.21" ] | |
postgres-version: [ 16, 15, 14, 13, 12, 11 ] | |
# Ensure that all combinations of Go and Postgres versions will run | |
continue-on-error: true | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Environment variables that are available to all jobs and steps in this workflow | |
env: | |
TEST_POSTGRES_DSN: postgres://postgres:postgres@127.0.0.1:5432/postgres?sslmode=disable | |
# Services are Docker containers that are run during a job | |
services: | |
# Start the postgres database | |
postgres: | |
image: postgres:${{ matrix.postgres-version }} | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: checkout | |
uses: actions/checkout@v3 | |
# Setting up Go in the runner | |
- name: setup go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
# Disabled because of incompatibility with Matrix Strategy | |
# # Cache Go build cache and modcache | |
# - name: cache deps | |
# uses: actions/cache@v3 | |
# with: | |
# path: | | |
# ~/.cache/go-build | |
# ~/go/pkg/mod | |
# key: ${{ runner.os }}}-go-${{ matrix.go-version }}-postgres-${{ matrix.postgres-version }}-${{ hashFiles('**/go.sum') }} | |
# restore-keys: | | |
# ${{ runner.os }}-go-${{ matrix.go-version }}- | |
# Runs Go tests | |
- name: test | |
run: go test ./... |