Skip to content

map extended to basic route types #288

map extended to basic route types

map extended to basic route types #288

Workflow file for this run

name: test
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
test:
name: run tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- '16.x'
postgis-docker-tag:
- '14-3.3-alpine'
- '15-3.3-alpine'
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install sponge (moreutils)
run: sudo apt install -y moreutils
- name: install & start PostgreSQL with PostGIS
# todo: currently, it uses mdillon, which doesn't have PostgreSQL 14
# uses: huaxk/postgis-action@v1
# with:
# postgresql version: '${{ matrix.postgis-docker-tag }}'
# postgresql password: password
# postgresql user: postgres
# postgresql db: postgres
run: |
docker run -d \
-e POSTGRES_USER=$PGUSER -e POSTGRES_PASSWORD=$PGPASSWORD -e POSTGRES_DB=$PGDATABASE \
-p 5432:5432 postgis/postgis:${{ matrix.postgis-docker-tag }}
env:
PGUSER: postgres
PGPASSWORD: password
PGDATABASE: postgres
- name: install PostgREST
run: |
set -e
set -x
dl_url="$(
curl -fsSL \
'https://api.github.com/repos/PostgREST/postgrest/releases/latest' \
| jq -rc '.assets[] | select(.name | test("linux-static-x64")) | .browser_download_url'
)"
wget -nv -U 'public-transport/gtfs-via-postgres CI' \
-O /tmp/postgrest.tar.xz \
"$dl_url"
tar -C /usr/local/bin -J -x postgrest </tmp/postgrest.tar.xz
/usr/local/bin/postgrest --version
- run: npm install
- run: npm run lint
- name: npm test
run : npm test
env:
PGHOST: localhost
PGPORT: '5432'
PGUSER: postgres
PGPASSWORD: password
PGDATABASE: postgres