Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/PR-content-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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:
workflow_call:
outputs:
result:
description: "The result of PR content check"
value: ${{ jobs.check-PR-content.outputs.output1 }}

jobs:
check-PR-content:
name: Check PR Content

runs-on: ubuntu-latest

outputs:
output1: ${{ steps.check-content.outputs.result }}

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" >> $GITHUB_OUTPUT; else echo "result=fail" >> $GITHUB_OUTPUT; fi
12 changes: 8 additions & 4 deletions .github/workflows/ion-java-performance-regression-detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ name: Ion Java performance regression detector
on: [pull_request]

jobs:
PR-Content-Check:
uses: amazon-ion/ion-java/.github/workflows/PR-content-check.yml@master

detect-regression:
name: Detect Regression

needs: PR-Content-Check
if: ${{ needs.PR-Content-Check.outputs.result == 'pass' }}
runs-on: ubuntu-latest

steps:
Expand All @@ -18,7 +22,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
Expand All @@ -27,7 +31,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: amazon-ion/ion-java-benchmark-cli
ref: master
Expand Down Expand Up @@ -70,7 +74,7 @@ jobs:
run : rm -r /home/runner/.m2

- name: Checkout the current commit
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: amazon-ion/ion-java
ref: master
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ion-test-driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ name: ion-test-driver
on: [pull_request]

jobs:
PR-Content-Check:
uses: amazon-ion/ion-java/.github/workflows/PR-content-check.yml@master

ion-test-driver:
runs-on: macos-10.15
needs: PR-Content-Check
if: ${{ needs.PR-Content-Check.outputs.result == 'pass' }}
steps:
- name: Checkout ion-java
uses: actions/checkout@master
Expand Down