From 89f18468f6db2a3eb564f323a339430ef0e565d3 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Wed, 8 Jul 2020 10:47:48 -0400 Subject: [PATCH 1/6] Add GitHub CI action for .proto validation --- .github/workflows/maven-publish.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 000000000..3ac2e414f --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,23 @@ +name: Validate GTFS-realtime .proto file + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + - name: Install Protoc + uses: arduino/setup-protoc@master + - name: Compile Java bindings + run: protoc --java_out=temp gtfs-realtime/proto/gtfs-realtime.proto From a2712a819bc8d8108aa97a2fa0103a600bde5be3 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Wed, 8 Jul 2020 10:49:51 -0400 Subject: [PATCH 2/6] chore: Refactor file name --- .github/workflows/{maven-publish.yml => validate-proto.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{maven-publish.yml => validate-proto.yml} (100%) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/validate-proto.yml similarity index 100% rename from .github/workflows/maven-publish.yml rename to .github/workflows/validate-proto.yml From b7b44df36563bdd92b6c67ccdcdd554c05f5fd60 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Wed, 8 Jul 2020 10:57:51 -0400 Subject: [PATCH 3/6] chore: Change when CI runs --- .github/workflows/validate-proto.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-proto.yml b/.github/workflows/validate-proto.yml index 3ac2e414f..ab22a5b65 100644 --- a/.github/workflows/validate-proto.yml +++ b/.github/workflows/validate-proto.yml @@ -1,8 +1,10 @@ name: Validate GTFS-realtime .proto file on: - release: - types: [created] + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: From 36fa125f409666288aec052c7a44ec4a0eb2d9f1 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Wed, 8 Jul 2020 11:03:23 -0400 Subject: [PATCH 4/6] chore: Change output dir --- .github/workflows/validate-proto.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-proto.yml b/.github/workflows/validate-proto.yml index ab22a5b65..36505985b 100644 --- a/.github/workflows/validate-proto.yml +++ b/.github/workflows/validate-proto.yml @@ -22,4 +22,4 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@master - name: Compile Java bindings - run: protoc --java_out=temp gtfs-realtime/proto/gtfs-realtime.proto + run: protoc --java_out=gtfs-realtime/proto gtfs-realtime/proto/gtfs-realtime.proto From da235d7016b7ecf7dffc9e1810efdf040a281351 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Wed, 8 Jul 2020 11:04:47 -0400 Subject: [PATCH 5/6] chore: Testing breaking the .proto --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index bd7d02ab4..b65709c19 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -211,7 +211,7 @@ message TripUpdate { optional StopTimeEvent departure = 3; // The relation between this StopTime and the static schedule. - enum ScheduleRelationship { + enum ScheduleRelationship // The vehicle is proceeding in accordance with its static schedule of // stops, although not necessarily according to the times of the schedule. // At least one of arrival and departure must be provided. If the schedule From 540a0f725592c4ffa2ad2ca9f06520e040eb656d Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Wed, 8 Jul 2020 11:07:03 -0400 Subject: [PATCH 6/6] chore: Unbreak the .proto Tests should pass again --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index b65709c19..bd7d02ab4 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -211,7 +211,7 @@ message TripUpdate { optional StopTimeEvent departure = 3; // The relation between this StopTime and the static schedule. - enum ScheduleRelationship + enum ScheduleRelationship { // The vehicle is proceeding in accordance with its static schedule of // stops, although not necessarily according to the times of the schedule. // At least one of arrival and departure must be provided. If the schedule