From 0f859b799193ebe9bd00b2af2d0ec22dc7a1c642 Mon Sep 17 00:00:00 2001 From: Tokuhiro Matsuno Date: Thu, 26 Oct 2023 14:33:35 +0900 Subject: [PATCH] Run SDK test on PR (#35) Close #33 --- .github/workflows/sdk-testing.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/sdk-testing.yml diff --git a/.github/workflows/sdk-testing.yml b/.github/workflows/sdk-testing.yml new file mode 100644 index 0000000..d80975f --- /dev/null +++ b/.github/workflows/sdk-testing.yml @@ -0,0 +1,36 @@ +name: SDK Test Automation + +on: + pull_request: + branches: + - main + +jobs: + test-java: + runs-on: ubuntu-latest + + steps: + - name: Checkout SDK repo + uses: actions/checkout@v2 + with: + repository: 'line/line-bot-sdk-java' + submodules: recursive + + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + + - name: Update line-openapi submodule + run: | + cd line-openapi + git remote add pr-source ${{ github.event.pull_request.head.repo.clone_url }} + git fetch pr-source ${{ github.event.pull_request.head.ref }} + git checkout FETCH_HEAD + + - name: Generate code + run: python3 generate-code.py + + - name: Execute Java SDK test + run: ./gradlew build