expose TripUpdate.timestamp ✅ #97
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: lint & test | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - '*' | |
| # make this workflow callable from other workflows | |
| workflow_call: | |
| env: | |
| PGHOST: localhost | |
| PGPORT: '5432' | |
| PGUSER: postgres | |
| PGPASSWORD: password | |
| PGDATABASE: postgres | |
| 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 APT dependencies | |
| run: | | |
| sudo apt install -y \ | |
| curl \ | |
| gpg \ | |
| lsb-release \ | |
| moreutils \ | |
| unzip | |
| - name: install curl-mirror | |
| run: | | |
| set -eux -o pipefail | |
| curl -fsSL 'https://gist.github.com/derhuerst/745cf09fe5f3ea2569948dd215bbfe1a/raw/9d145086ba239f05b20b6b984fa49563bd781194/mirror.mjs' -o /usr/local/bin/curl-mirror | |
| chmod +x /usr/local/bin/curl-mirror | |
| - name: set timezone to Europe/Berlin | |
| run: sudo timedatectl set-timezone Europe/Berlin | |
| # 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 | |
| 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 "$PGPORT: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 |