Repository Mock 패턴으로 실제 비즈니스 로직 테스트 구현 #49
Workflow file for this run
This file contains hidden or 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: 🧪 Tests | |
| on: | |
| push: | |
| branches: [develop, main, master] | |
| pull_request: | |
| branches: [develop, main, master] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: macos-15 | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.1' | |
| - name: Cache Tuist dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.tuist/Cache | |
| ~/.cache/tuist | |
| Tuist/.build | |
| key: ${{ runner.os }}-tuist-${{ hashFiles('Tuist/Dependencies.swift', 'Tuist/Package.swift') }} | |
| restore-keys: | | |
| ${{ runner.os }}-tuist- | |
| - name: Install dependencies using TuistTool | |
| run: | | |
| swift TuistTool.swift install | |
| - name: Run Repository Tests | |
| run: | | |
| echo "Running Repository Layer Tests..." | |
| swift TuistTool.swift test --path Projects/Data/Repository | |
| - name: Run UseCase Tests | |
| run: | | |
| echo "Running UseCase Layer Tests..." | |
| swift TuistTool.swift test --path Projects/Domain/UseCase | |
| continue-on-error: true | |
| - name: Run All Tests | |
| run: | | |
| echo "Running All Project Tests..." | |
| swift TuistTool.swift test | |
| continue-on-error: true | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-${{ github.run_number }} | |
| path: | | |
| **/*.xcresult | |
| ~/.cache/tuist/Runs/**/*result-bundle* | |
| retention-days: 30 |