diff --git a/.github/workflows/ion-java-performance-regression-detector.yml b/.github/workflows/ion-java-performance-regression-detector.yml index 277ccff505..7e179f113d 100644 --- a/.github/workflows/ion-java-performance-regression-detector.yml +++ b/.github/workflows/ion-java-performance-regression-detector.yml @@ -3,13 +3,16 @@ name: Ion Java performance regression detector -on: [pull_request] - +on: + workflow_run: + workflows: [ PR Content Check ] + types: + - completed jobs: detect-regression: name: Detect Regression - runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: Set up JDK 1.8 @@ -18,7 +21,7 @@ jobs: java-version: 1.8 - name: Checkout ion-java from the new commit. - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} path: ion-java-new @@ -27,7 +30,7 @@ jobs: run: cd ion-java-new && git submodule init && git submodule update && ./gradlew clean publishToMavenLocal - name: Checkout ion-java-benchmark-cli - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: amzn/ion-java-benchmark-cli ref: master @@ -70,7 +73,7 @@ jobs: run : rm -r /home/runner/.m2 - name: Checkout the current commit - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: amzn/ion-java ref: master diff --git a/.github/workflows/ion-test-driver.yml b/.github/workflows/ion-test-driver.yml index e39846aed3..40af32fafe 100644 --- a/.github/workflows/ion-test-driver.yml +++ b/.github/workflows/ion-test-driver.yml @@ -1,10 +1,14 @@ name: ion-test-driver -on: [pull_request] - +on: + workflow_run: + workflows: [ PR Content Check ] + types: + - completed jobs: ion-test-driver: runs-on: macos-10.15 + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: Checkout ion-java uses: actions/checkout@master diff --git a/.github/workflows/pr-content-check.yml b/.github/workflows/pr-content-check.yml new file mode 100644 index 0000000000..1c70e463f4 --- /dev/null +++ b/.github/workflows/pr-content-check.yml @@ -0,0 +1,26 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: PR Content Check + +on: [pull_request] + +jobs: + check-PR-content: + name: Check PR Content + + runs-on: ubuntu-latest + + steps: + - name: Checkout the incoming pull request + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + path: ion-java-new + + - name: Check the content of the last commit + id: check-content + run: | + cd ion-java-new + if [[ $(git log -1 --name-only) == *"src/"* ]]; then echo "result=pass"; else exit 1; fi diff --git a/src/com/amazon/ion/impl/_Private_ByteTransferReader.java b/src/com/amazon/ion/impl/_Private_ByteTransferReader.java index b1b9d95d35..7e7bc8428c 100644 --- a/src/com/amazon/ion/impl/_Private_ByteTransferReader.java +++ b/src/com/amazon/ion/impl/_Private_ByteTransferReader.java @@ -17,7 +17,7 @@ import com.amazon.ion.IonReader; import java.io.IOException; - +// Test only /** * An {@link IonReader} {@linkplain com.amazon.ion.facet facet} that can rapidly bulk-copy * Ion binary data under certain circumstances.