Skip to content

Bump the go-deps group with 9 updates (#3826) #399

Bump the go-deps group with 9 updates (#3826)

Bump the go-deps group with 9 updates (#3826) #399

Workflow file for this run

---
name: Test PostgreSQL
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
check-latest: true
cache: true
- uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: 'v2.6.0'
args: ./storage/postgresql
integration-and-unit-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--name pgsql
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
check-latest: true
cache: true
- name: Build before tests
run: go mod download && go build ./...
- name: Run integration tests
run: ./integration/integration_test.sh
env:
TEST_POSTGRESQL_URI: postgresql:///defaultdb?host=localhost&user=postgres&password=postgres
POSTGRESQL_IN_CONTAINER: true
POSTGRESQL_CONTAINER_NAME: pgsql
- name: Run unit tests
run: go test -v ./storage/postgresql/... ./quota/postgresqlqm/...