Skip to content

Commit

Permalink
Run CLI tests on GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Sep 24, 2024
1 parent 1ba2a08 commit 5e64b73
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,20 @@ jobs:
cache: 'maven'

- name: Test project with Maven
run: mvn --no-transfer-progress test package
run: mvn --no-transfer-progress test package

cli:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Run CLI e2e tests
run: ./cli-tests/cli-tests.sh
8 changes: 5 additions & 3 deletions cli-tests/cli-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ mvn clean package -DskipTests -Dmaven.source.skip=true -Dmaven.javadoc.skip=true

# transformer-cli

cp onebusaway-gtfs-transformer-cli/target/onebusaway-gtfs-transformer-cli.jar ./transformer-cli.jar
TRANSFORMER_JAR="transformer-cli.jar"

cp onebusaway-gtfs-transformer-cli/target/onebusaway-gtfs-transformer-cli.jar ./${TRANSFORMER_JAR}
wget https://github.com/google/transit/blob/master/gtfs/spec/en/examples/sample-feed-1.zip?raw=true -O gtfs.zip

java -jar transformer-cli.jar --help
java -jar ${TRANSFORMER_JAR} --help

java -jar transformer-cli.jar --transform="{'op':'remove','match':{'file':'stops.txt','stop_id':'BEATTY_AIRPORT'}}" gtfs.zip gtfs.transformed.zip
java -jar ${TRANSFORMER_JAR} --transform="{'op':'remove','match':{'file':'stops.txt','stop_id':'BEATTY_AIRPORT'}}" gtfs.zip gtfs.transformed.zip

0 comments on commit 5e64b73

Please sign in to comment.