Skip to content

Cap HTTP redirect hops #744

Cap HTTP redirect hops

Cap HTTP redirect hops #744

Workflow file for this run

name: Test Suite
on:
pull_request:
types:
- opened
pull_request_target:
types:
- opened
push:
branches:
- '*'
permissions:
contents: write
actions: write
pull-requests: write
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest] # , macos-15
go-version: ['1.24.2']
runs-on: ${{ matrix.os }}
env:
TL_TEST_DATABASE_URL: postgres://root:for_testing@localhost:5432/tlv2_test?sslmode=disable
TL_TEST_SERVER_DATABASE_URL: postgres://root:for_testing@localhost:5432/tlv2_test_server?sslmode=disable
TL_REDIS_URL: redis://localhost
services:
postgres:
image: postgis/postgis:12-3.4-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: for_testing
POSTGRES_DB: tlv2_test_server
options: >-
--health-cmd "pg_isready -U root -d tlv2_test_server"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7.4.0-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go
- run: (cd cmd/transitland && go version && go install .)
- run: ./testdata/test_setup.sh
- name: Run tests
run: go test -coverprofile c.out ./...
- name: Produce coverage report
run: go tool cover -html=c.out -o coverage.html
- name: Save coverage report as artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os }}
path: coverage.html