Skip to content

Update readme, add es root route #80

Update readme, add es root route

Update readme, add es root route #80

Workflow file for this run

name: Test goapistac
on:
push:
branches:
- main
pull_request:
branches:
- main
- features/**
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: ghcr.io/stac-utils/pgstac:v0.6.6
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: postgis
POSTGRES_USER: username
PGUSER: username
PGPASSWORD: password
PGHOST: localhost
PGDATABASE: postgis
ports:
- 5433:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.15.2
env:
discovery.type: single-node
bootstrap.memory_lock: true
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
xpack.security.enabled: false
ports:
- "9200:9200"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19.x
- name: Download Go module dependencies for pg-api
run: |
cd pg-api
go mod download
- name: Download Go module dependencies for es-api
run: |
cd es-api
go mod download
- name: Test pg-api Go application
run: |
cd pg-api
go install github.com/joho/godotenv/cmd/godotenv@latest
echo "$GITHUB_WORKSPACE/go/bin" >> $GITHUB_PATH
export POSTGRES_HOST=localhost
export POSTGRES_PORT=5433
echo "POSTGRES_USER=$POSTGRES_USER" >> .env
echo "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" >> .env
echo "POSTGRES_DBNAME=$POSTGRES_DBNAME" >> .env
echo "POSTGRES_PORT=$POSTGRES_PORT" >> .env
echo "POSTGRES_HOST=$POSTGRES_HOST" >> .env
godotenv -f .env go test ./...
- name: Test es-api Go application
run: |
cd es-api
go install github.com/joho/godotenv/cmd/godotenv@latest
echo "ES_HOST=localhost" >> .env
godotenv go test ./...