Support GTFS validator v4.1.0 in validation tasks #162
Workflow file for this run
This file contains 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: Build and push gtfs-schedule-validator image | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '.github/workflows/build-gtfs-schedule-validator-image.yml' | |
- 'jobs/gtfs-schedule-validator/**' | |
pull_request: | |
paths: | |
- '.github/workflows/build-gtfs-schedule-validator-image.yml' | |
- 'jobs/gtfs-schedule-validator/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
check: | |
name: Run static checkers | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- run: curl -sSL https://install.python-poetry.org | python - | |
- run: cd jobs/gtfs-schedule-validator && poetry install && poetry run mypy . | |
test: | |
name: Run pytest | |
runs-on: ubuntu-latest | |
env: | |
CALITP_BUCKET__GTFS_SCHEDULE_VALIDATION_HOURLY: gs://some-test-bucket | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- run: curl -sSL https://install.python-poetry.org | python - | |
- run: cd jobs/gtfs-schedule-validator && poetry install && poetry run pytest | |
build_push: | |
name: Package docker image | |
runs-on: ubuntu-latest | |
needs: [check, test] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v2 | |
with: | |
context: jobs/gtfs-schedule-validator | |
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
tags: ghcr.io/${{github.repository}}/gtfs-schedule-validator:latest |