Skip to content

Commit

Permalink
Update ios.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsMEMZ authored Nov 18, 2023
1 parent e580308 commit d2faf88
Showing 1 changed file with 50 additions and 14 deletions.
64 changes: 50 additions & 14 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
name: Release_Distribution.ipa
path: ./Export_Release_d/DarockBili.ipa

run_tests:
build_for_testing:
runs-on: macos-13
name: Test App
steps:
Expand All @@ -80,33 +80,69 @@ jobs:

- name: Resolve Swift dependencies
run: xcodebuild -resolvePackageDependencies -scheme 'DarockBili Watch App' -configuration Release

- name: Prepare Cache Folder
run: mkdir Caches

- name: Build for Testing
run: xcodebuild build-for-testing -project ./DarockBili.xcodeproj -scheme 'DarockBili Watch App' -configuration Release -destination 'platform=watchOS Simulator,name=Apple Watch Series 7 (41mm),OS=10.0' -destination 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)' -testPlan WatchAppUITestPlan | tee TestBuilding.log
- name: Build
run: xcodebuild build-for-testing -project ./DarockBili.xcodeproj -scheme 'DarockBili Watch App' -configuration Release -destination 'platform=watchOS Simulator,name=Apple Watch Series 7 (41mm),OS=10.0' -destination 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm),OS=10.0' -testPlan WatchAppUITestPlan -testProductsPath ./Caches/TestProducts.xctestproducts -derivedDataPath ./Caches/DerivedData -resultBundleVersion 3 -resultBundlePath ./Caches/resultbundle.xcresult | tee TestBuilding.log

- name: Upload Building Log
uses: actions/upload-artifact@v3
with:
name: Watch Test Building Log
path: ./TestBuilding.log

- name: Test for Watch
run: xcodebuild test-without-building -project ./DarockBili.xcodeproj -scheme 'DarockBili Watch App' -configuration Release -destination 'platform=watchOS Simulator,name=Apple Watch Series 7 (41mm),OS=10.0' -destination 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)' -testPlan WatchAppUITestPlan | tee WatchTest.log

- name: Upload Testing Log
uses: actions/upload-artifact@v3
- name: Update Caches
uses: actions/cache@v3
with:
name: Watch Testing Log
path: ./WatchTest.log
key: XCTest-Build-Cache-${{ github.sha }}
path: ./Caches

- name: Upload Full Code
test_watch1:
runs-on: macos13
name: Test on Apple Watch Series 7 (41mm)
needs:
- build_for_testing
steps:
- uses: actions/checkout@v3

- name: Restore Caches
uses: actions/cache@v3
with:
key: XCTest-Build-Cache-${{ github.sha }}
path: ./Caches

- name: Test
run: xcodebuild test-without-building -project ./DarockBili.xcodeproj -scheme 'DarockBili Watch App' -configuration Release -destination 'platform=watchOS Simulator,name=Apple Watch Series 7 (41mm),OS=10.0' -testPlan WatchAppUITestPlan -testProductsPath ./Caches/TestProducts.xctestproducts -derivedDataPath ./Caches/DerivedData -resultBundleVersion 3 -resultBundlePath ./Caches/resultbundle.xcresult

- name: Upload Downloads Folder
uses: actions/upload-artifact@v3
with:
name: Full
path: ./
name: Files in Downloads Folder1
path: ~/Downloads

test_watch2:
runs-on: macos13
name: Test on Apple Watch Series 9 (45mm)
needs:
- build_for_testing
steps:
- uses: actions/checkout@v3

- name: Restore Caches
uses: actions/cache@v3
with:
key: XCTest-Build-Cache-${{ github.sha }}
path: ./Caches

- name: Test
run: xcodebuild test-without-building -project ./DarockBili.xcodeproj -scheme 'DarockBili Watch App' -configuration Release -destination 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm),OS=10.0' -testPlan WatchAppUITestPlan -testProductsPath ./Caches/TestProducts.xctestproducts -derivedDataPath ./Caches/DerivedData -resultBundleVersion 3 -resultBundlePath ./Caches/resultbundle.xcresult

- name: Upload Downloads Folder
uses: actions/upload-artifact@v3
with:
name: Files in Downloads Folder
name: Files in Downloads Folder2
path: ~/Downloads


0 comments on commit d2faf88

Please sign in to comment.