diff --git a/.github/workflows/data-pipeline.yml b/.github/workflows/data-pipeline.yml new file mode 100644 index 00000000..af9724cb --- /dev/null +++ b/.github/workflows/data-pipeline.yml @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2024 Jonah Brüchert +# 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 diff --git a/.github/workflows/test-import.yml b/.github/workflows/test-import.yml new file mode 100644 index 00000000..e1cc7ff7 --- /dev/null +++ b/.github/workflows/test-import.yml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2024 Jonah Brüchert +# 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 diff --git a/ci/container/Containerfile b/ci/container/Containerfile index c52b4b05..7bfb8f8d 100644 --- a/ci/container/Containerfile +++ b/ci/container/Containerfile @@ -1,9 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Jonah Brüchert +# 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