Skip to content

GitHub Actions Cache 설정 #34

GitHub Actions Cache 설정

GitHub Actions Cache 설정 #34

Workflow file for this run

name: Run CI
on:
pull_request:
branches: [ develop, main ]
jobs:
test:
runs-on: macos-13
env:
PROJECT: InMyMemory.xcodeproj
SCHEME: InMyMemory
DESTINATION: platform=iOS Simulator,name=iPhone 14,OS=latest
steps:
- uses: actions/checkout@v3
- name: Setup Xcode 15.0 Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0'
- name: SPM Cache
uses: actions/cache@v3
with:
path: ~/Library/Developer/Xcode/DerivedData/InMyMemory*/SourcePackages/
key: ${{ runner.os }}-spm-${{ hashFiles('InMyMemory.xcodeproj/project.xcworkspace/xcshareddata/swiftpm//Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Build and Test
run: |
xcodebuild test \
-project "$PROJECT" \
-scheme "$SCHEME" \
-clonedSourcePackagesDirPath SourcePackages \
-destination "$DESTINATION" \
-enableCodeCoverage YES \
-resultBundlePath ./InMyMemory.xcresult;
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
xcode: true
xcode_archive_path: ./InMyMemory.xcresult