Skip to content

CI: install dependencies of postgis-gtfs-importer 💚 #88

CI: install dependencies of postgis-gtfs-importer 💚

CI: install dependencies of postgis-gtfs-importer 💚 #88

Workflow file for this run

name: lint & test
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
# make this workflow callable from other workflows
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['22']
postgis-docker-tag:
- '14-3.4-alpine'
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
- name: setup Node v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: install sponge (moreutils)
run: sudo apt install -y moreutils
# Note: We install Redis v8 from their PPA because the Ubuntu/Debian sources only have v7.
# see also https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/apt/
- name: install & start Redis
run: |
set -eux -o pipefail
sudo apt install -y curl gpg lsb-release
curl -fsSL 'https://packages.redis.io/gpg' | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt update
sudo apt install -y redis
redis-cli PING
- name: install & start PostgreSQL with PostGIS
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 }} \
-c timezone=Europe/Berlin
env:
PGUSER: postgres
PGPASSWORD: password
PGDATABASE: postgres
- run: npm install
- name: npm install (postgis-gtfs-importer)
run: |
cd postgis-gtfs-importer
npm install --production
- run: npm run lint
- run: npm test