에러핸들러 추가 (#120) #406
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- 'develop' | |
push: | |
branches: | |
- 'develop' | |
jobs: | |
cancel-workflow: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
build: | |
runs-on: ubuntu-latest | |
needs: cancel-workflow | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Clean build | |
run: ./gradlew clean | |
- name: Run ktlintDebug | |
run: ./gradlew ktlintCheck | |
- name: Upload ktlint report | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: ktlint-result | |
path: ./**/build/reports/ktlint/**/*.html | |
- name: Setup Secrets (Staging) | |
run: | | |
mkdir -p ./app/src/staging/res/values | |
cat << EOF > ./app/src/staging/res/values/secrets.xml | |
${{ secrets.secrets_xml_staging }} | |
EOF | |
- name: Setup google-services.json (Staging) | |
run: | | |
cat << EOF > ./app/src/staging/google-services.json | |
${{ secrets.google_services_json_staging }} | |
EOF | |
- name: Build debug APK | |
run: ./gradlew assembleStagingDebug --stacktrace | |
- name: Run test | |
run: ./gradlew testStagingDebug --stacktrace | |
- name: Upload test report | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: test-result | |
path: ./**/build/reports/tests/** |