Skip to content
This repository was archived by the owner on Aug 9, 2025. It is now read-only.

Merge pull request #29 from interline-io/move-code #171

Merge pull request #29 from interline-io/move-code

Merge pull request #29 from interline-io/move-code #171

Workflow file for this run

name: Test Suite
on:
pull_request:
types:
- opened
push:
branches:
- '*'
jobs:
test:
runs-on: ubuntu-24.04
env:
PGDATABASE: tlv2_test_server
PGUSER: root
PGPASSWORD: for_testing
PGHOST: localhost
PGPORT: 5432
TL_TEST_SERVER_DATABASE_URL: postgres://root:for_testing@localhost:5432/tlv2_test_server?sslmode=disable
TL_TEST_REDIS_URL: redis://localhost
services:
postgres:
image: postgis/postgis:12-3.2-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: for_testing
POSTGRES_DB: tlv2_test_server
# needed because the postgres container does not provide a healthcheck
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7.4.0-alpine
ports:
- 6379:6379
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.24.2'
- run: git clone https://github.com/interline-io/transitland-lib.git && (cd ${PWD}/transitland-lib/cmd/transitland && go install .)
- run: dropdb --if-exists ${PGDATABASE}
- run: ${PWD}/transitland-lib/schema/postgres/bootstrap.sh
- run: go test -v -count=1 ./...