Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbruechert committed Feb 16, 2024
1 parent 777a356 commit 2edba4c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/data-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]>
# SPDX-License-Identifier: CC0-1.0

name: Import data

on: [push, workflow_dispatch]

jobs:
import:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Fetch submodules
run: git submodule update --init --checkout --remote
- name: Build docker images
run: docker build -t transitous . -f ci/container/Containerfile
- name: Fetch GTFS-Feeds
run: docker run -v $PWD:/transitous -w /transitous transitous ci/fetch-feeds.py timer
- name: Generate MOTIS config file
run: docker run --env PYTHONPATH=src -v $PWD:/transitous -w /transitous transitous ci/generate-motis-config.py
19 changes: 19 additions & 0 deletions .github/workflows/test-import.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]>
# SPDX-License-Identifier: CC0-1.0

name: Verfy new data can be imported

on: [pull-request]

jobs:
import:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Fetch submodules
run: git submodule update --init --checkout --remote
- name: Build docker images
run: docker build -t transitous . -f ci/container/Containerfile
- name: Verify that new feeds can be downloaded
run: docker run -v $PWD:/transitous -w /transitous transitous ci/fetch-feeds.py merge-request
6 changes: 3 additions & 3 deletions ci/container/Containerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]>
# SPDX-License-Identifier: CC0-1.0

FROM docker.io/debian:bookworm-slim

RUN apt-get update && apt-get install git python3-requests golang -y && apt clean

ADD https://github.com/motis-project/motis/releases/download/v0.11.18/motis-linux-amd64.tar.bz2 /opt/
RUN GOBIN=/usr/local/bin/ go install github.com/patrickbr/gtfstidy@latest

RUN adduser motis
USER motis

0 comments on commit 2edba4c

Please sign in to comment.