Merge pull request #1076 from kiwix/fix-macOS-sandbox-on-ci

Fix sandbox issue for macOS CI unit tests
This commit is contained in:
Kelson 2025-01-17 09:53:05 +01:00 committed by GitHub
commit 2ade82fb64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View File

@ -66,7 +66,7 @@ jobs:
- name: Run Unit Tests on macOS
if: matrix.platform == 'macOS'
run: xcodebuild test -scheme Kiwix -destination 'platform=macOS'
run: xcodebuild test -scheme Kiwix -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO
- name: Upload code coverage
uses: codecov/codecov-action@v4.2.0

1
.gitignore vendored
View File

@ -74,6 +74,7 @@ Libraries
# ignore xcode project files, they are now generated by XcodeGen
*.xcodeproj
Support/Kiwix.entitlements
Support/Kiwix-unitTest.entitlements
# ignore the lock file, it is not working the same way as lock files in other tools
Brewfile.lock.json

View File

@ -122,6 +122,13 @@ targets:
PRODUCT_BUNDLE_IDENTIFIER: org.kiwix.Tests
TEST_HOST: $(BUILT_PRODUCTS_DIR)/Kiwix.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Kiwix
BUNDLE_LOADER: $(TEST_HOST)
entitlements:
path: Support/Kiwix-unitTest.entitlements
properties:
com.apple.security.app-sandbox: false
# from macOS 14, sandbox and unit test are not working together on CI
# a pop up appears that needs user acceptance
# see: https://developer.apple.com/documentation/security/accessing-files-from-the-macos-app-sandbox
sources:
- path: Tests
dependencies: