./categories/dev-ops
GitHub Actions Step 실패 제어
Step 실패 후에도 후속 Step 실행
continue-on-error (실패를 성공으로 취급 → 이후 전부 진행)
- name: Test with Gradle
continue-on-error: true
run: ./gradlew :app:testDebug
if: failure() (실패 시에만 실행 — 리포트 업로드 등)
- name: Upload Test
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-report
path: app/build/reports/tests/testDebugUnitTest/index.html
- 기본 동작: 이전 Step 실패 시 이후는 skip (
if: success()암시) - 문서: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error
관련 링크: https://kotlinworld.com/403
./comments