Skip to content

Commit

Permalink
fix: working-directory 개별 step 마다 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
murjune committed Sep 22, 2024
1 parent bcef61c commit 13a9e79
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .github/actions/ktlint_check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions .github/actions/unit_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 1 addition & 13 deletions .github/workflows/Android_Develop_PR_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit 13a9e79

Please sign in to comment.