Skip to content

Commit

Permalink
Add macOS test
Browse files Browse the repository at this point in the history
  • Loading branch information
kishikawakatsumi committed Nov 7, 2023
1 parent 225b7d4 commit dbdd66e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ jobs:
strategy:
fail-fast: false
matrix:
xcode: ["12.5.1", "13.2.1", "14.2", "14.3.1"]
macos: ["macos-11", "macos-12", "macos-13"]
xcode: ["12.5.1", "13.2.1", "14.2", "14.3.1"]
platform: ["ios"]
command: ["test"]
exclude:
- macos: "macos-11"
xcode: "13.2.1"
- macos: "macos-11"
xcode: "14.2"
- macos: "macos-11"
Expand Down Expand Up @@ -50,7 +48,7 @@ jobs:
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
PP_PATH=$RUNNER_TEMP/build_pp.provisionprofile
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
Expand All @@ -70,30 +68,31 @@ jobs:
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Test
if: ${{ matrix.xcode=='12.5.1' }}
if: ${{ matrix.xcode=='12.5.1' && matrix.platform=='ios' }}
run: |
set -ex
xcodebuild test -workspace KeychainAccess.xcworkspace -scheme KeychainAccess -destination 'platform=iOS Simulator,OS=14.5,name=iPhone 12 Pro' -only-testing:KeychainAccessTests -resultBundlePath TestResults.xcresult
- name: Test
if: ${{ matrix.xcode=='13.4.1' }}
if: ${{ matrix.xcode=='13.2.1' && matrix.platform=='ios' }}
run: |
set -ex
xcodebuild test -workspace KeychainAccess.xcworkspace -scheme KeychainAccess -destination 'platform=iOS Simulator,OS=15.5,name=iPhone 13 Pro' -only-testing:KeychainAccessTests -resultBundlePath TestResults.xcresult
xcodebuild test -workspace KeychainAccess.xcworkspace -scheme KeychainAccess -destination 'platform=iOS Simulator,OS=15.2,name=iPhone 13 Pro' -only-testing:KeychainAccessTests -resultBundlePath TestResults.xcresult
- name: Test
if: ${{ matrix.xcode=='14.2' }}
if: ${{ matrix.xcode=='14.2' && matrix.platform=='ios' }}
run: |
set -ex
xcodebuild test -workspace KeychainAccess.xcworkspace -scheme KeychainAccess -destination 'platform=iOS Simulator,OS=16.2,name=iPhone 14 Pro' -only-testing:KeychainAccessTests -resultBundlePath TestResults.xcresult
- name: Test
if: ${{ matrix.xcode=='14.3.1' }}
if: ${{ matrix.xcode=='14.3.1' && matrix.platform=='ios' }}
run: |
set -ex
xcodebuild test -workspace KeychainAccess.xcworkspace -scheme KeychainAccess -destination 'platform=iOS Simulator,OS=16.4,name=iPhone 14 Pro' -only-testing:KeychainAccessTests
- name: Test
if: ${{ matrix.xcode=='14.3.1' }}
if: ${{ matrix.xcode=='14.3.1' && matrix.platform=='ios' }}
run: |
set -ex
xcodebuild test -workspace KeychainAccess.xcworkspace -scheme KeychainAccess -destination 'platform=iOS Simulator,OS=17.0.1,name=iPhone 14 Pro' -only-testing:KeychainAccessTests -resultBundlePath TestResults.xcresult
xcodebuild build-for-testing -project ./Lib/KeychainAccess.xcodeproj -scheme KeychainAccess -destination 'platform=macOS,arch=x86_64' -only-testing:KeychainAccessTests
- uses: kishikawakatsumi/xcresulttool@v1
with:
path: TestResults.xcresult
Expand Down
2 changes: 1 addition & 1 deletion Lib/Configurations/Base.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ DEVELOPMENT_TEAM = ;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
WATCHOS_DEPLOYMENT_TARGET = 3.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MACOSX_DEPLOYMENT_TARGET = 10.13;

SWIFT_VERSION = 5.0;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

0 comments on commit dbdd66e

Please sign in to comment.