From 13a9e798573a7f8d8f497733e646d1ce36447274 Mon Sep 17 00:00:00 2001 From: murjune Date: Sun, 22 Sep 2024 21:39:04 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20working-directory=20=EA=B0=9C=EB=B3=84?= =?UTF-8?q?=20step=20=EB=A7=88=EB=8B=A4=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/ktlint_check/action.yml | 4 ++++ .github/actions/unit_test/action.yml | 5 +++++ .github/workflows/Android_Develop_PR_CI.yml | 14 +------------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/actions/ktlint_check/action.yml b/.github/actions/ktlint_check/action.yml index 08d84cb2..ad430fa0 100644 --- a/.github/actions/ktlint_check/action.yml +++ b/.github/actions/ktlint_check/action.yml @@ -31,16 +31,20 @@ runs: - name: Create Local Properties shell: bash run: touch local.properties + working-directory: ./android - name: Access Local Properties shell: bash run: | echo POKE_BASE_URL=\"${{ inputs.POKE_BASE_URL }}\" >> local.properties + working-directory: ./android - name: Grant execute permission for gradlew shell: bash run: chmod +x gradlew + working-directory: ./android - name: Lint Check shell: bash run: ./gradlew ktlintCheck + working-directory: ./android diff --git a/.github/actions/unit_test/action.yml b/.github/actions/unit_test/action.yml index d457dc82..28700e99 100644 --- a/.github/actions/unit_test/action.yml +++ b/.github/actions/unit_test/action.yml @@ -48,20 +48,25 @@ runs: echo ${{ inputs.GOOGLE_SERVICES_ALPHA }} >> ./app/src/alpha/google-services.json echo ${{ inputs.GOOGLE_SERVICES_BETA }} >> ./app/src/beta/google-services.json echo ${{ inputs.GOOGLE_SERVICES }} >> ./app/src/release/google-services.json + working-directory: ./android - name: Create Local Properties shell: bash run: touch local.properties + working-directory: ./android - name: Access Local Properties shell: bash run: | echo POKE_BASE_URL=\"${{ inputs.POKE_BASE_URL }}\" >> local.properties + working-directory: ./android - name: Grant execute permission for gradlew shell: bash run: chmod +x gradlew + working-directory: ./android - name: Run Alpha Unit Tests shell: bash run: ./gradlew testAlphaUnitTest + working-directory: ./android \ No newline at end of file diff --git a/.github/workflows/Android_Develop_PR_CI.yml b/.github/workflows/Android_Develop_PR_CI.yml index 8969d4e0..9d85285c 100644 --- a/.github/workflows/Android_Develop_PR_CI.yml +++ b/.github/workflows/Android_Develop_PR_CI.yml @@ -4,19 +4,11 @@ on: pull_request: branches: [ an/develop ] -defaults: - run: - working-directory: ./android - jobs: ktlintCheck: name: ktLint Check runs-on: ubuntu-latest - defaults: - run: - working-directory: ./android - steps: - uses: actions/checkout@v4 - name: Run ktLint Check @@ -28,13 +20,9 @@ jobs: name: Test Alpha Unit Test runs-on: ubuntu-latest - defaults: - run: - working-directory: ./android - steps: - uses: actions/checkout@v4 - - name: Run ktLint Check + - name: Run Alpha Unit Test uses: ./.github/actions/unit_test with: POKE_BASE_URL: ${{ secrets.POKE_BASE_URL }}