Daily Static GTFS Processes #849
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: Daily Static GTFS Processes | |
on: | |
# Daily at 10PM pacific | |
schedule: | |
- cron: '0 5 * * *' | |
jobs: | |
Run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | |
- name: Build with Gradle | |
working-directory: gtfu | |
run: ./gradlew build | |
- name: Setup Cloud SDK | |
uses: google-github-actions/auth@v0 | |
with: | |
# Google recommends using a Workload Identify Federation instead of using the service account key json file | |
# but this method is continuing to be supported. More info: https://github.com/google-github-actions/auth#setup | |
service_account: '[email protected]' | |
credentials_json: ${{ secrets.GCP_SA_KEY_JSON }} | |
- name: Load agency data | |
working-directory: gtfu | |
run: java -cp build/classes/java/test:build/libs/gtfu.jar gtfu.test.LoadAgencyDataTest -c src/main/resources/conf/cache -u ${{ secrets.LIVE_AGENCIES_URL }} | |
env: | |
SENDGRID_API_KEY: ${{secrets.SENDGRID_API_KEY}} | |
- name: Update trip names | |
working-directory: gtfu | |
run: java -cp build/libs/gtfu.jar gtfu.tools.UpdateTripNames -u ${{ secrets.LIVE_AGENCIES_URL }} | |
env: | |
GH_ACCESS_TOKEN: ${{secrets.GH_ACCESS_TOKEN}} | |
SENDGRID_API_KEY: ${{secrets.SENDGRID_API_KEY}} | |
- name: Check feed expiration | |
working-directory: gtfu | |
run: java -cp build/libs/gtfu.jar gtfu.tools.CheckFeedExpiration -u ${{ secrets.LIVE_AGENCIES_URL }} -s -e | |
env: | |
GRAAS_BOT_WEBHOOK: ${{secrets.GRAAS_BOT_WEBHOOK}} | |
SENDGRID_API_KEY: ${{secrets.SENDGRID_API_KEY}} | |
- name: Generate Block Data | |
working-directory: gtfu | |
run: java -cp build/libs/gtfu.jar gtfu.tools.BulkBlockDataGenerator -u ${{ secrets.LIVE_AGENCIES_URL }} -d 2 | |
env: | |
SENDGRID_API_KEY: ${{secrets.SENDGRID_API_KEY}} | |
- name: Generate Test Block Data | |
working-directory: gtfu | |
run: | | |
java -cp build/libs/gtfu.jar gtfu.tools.BlockDataGenerator -a test -d 0 -U https://unitrans.ucdavis.edu/media/gtfs/Unitrans_GTFS.zip -u | |
java -cp build/libs/gtfu.jar gtfu.tools.BlockDataGenerator -a test -d 1 -U https://unitrans.ucdavis.edu/media/gtfs/Unitrans_GTFS.zip -u | |
java -cp build/libs/gtfu.jar gtfu.tools.BlockDataGenerator -a test -d 2 -U https://unitrans.ucdavis.edu/media/gtfs/Unitrans_GTFS.zip -u | |
- name: Save GTFS files to Gcloud | |
working-directory: gtfu | |
run: java -cp build/libs/gtfu.jar gtfu.tools.StaticGTFSToBucket -u ${{ secrets.LIVE_AGENCIES_URL }} -b graas-resources -c src/main/resources/conf/cache | |
env: | |
SENDGRID_API_KEY: ${{secrets.SENDGRID_API_KEY}} |