Skip to content

hk: bump deps, go 1.22.x in ci #30

hk: bump deps, go 1.22.x in ci

hk: bump deps, go 1.22.x in ci #30

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.21.x, 1.22.x]
services:
postgres:
image: postgres
ports:
- 5432/tcp
env:
POSTGRES_PASSWORD: s3cret
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: make test
env:
DATABASE_DSN: postgresql://postgres:s3cret@localhost:${{ job.services.postgres.ports[5432] }}/postgres?sslmode=disable