Skip to content

Commit 2ade82f

Browse files
authored
Merge pull request #1076 from kiwix/fix-macOS-sandbox-on-ci
Fix sandbox issue for macOS CI unit tests
2 parents 58f7577 + 723ccff commit 2ade82f

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
6767
- name: Run Unit Tests on macOS
6868
if: matrix.platform == 'macOS'
69-
run: xcodebuild test -scheme Kiwix -destination 'platform=macOS'
69+
run: xcodebuild test -scheme Kiwix -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO
7070

7171
- name: Upload code coverage
7272
uses: codecov/[email protected]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Libraries
7474
# ignore xcode project files, they are now generated by XcodeGen
7575
*.xcodeproj
7676
Support/Kiwix.entitlements
77+
Support/Kiwix-unitTest.entitlements
7778

7879
# ignore the lock file, it is not working the same way as lock files in other tools
7980
Brewfile.lock.json

project.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ targets:
122122
PRODUCT_BUNDLE_IDENTIFIER: org.kiwix.Tests
123123
TEST_HOST: $(BUILT_PRODUCTS_DIR)/Kiwix.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Kiwix
124124
BUNDLE_LOADER: $(TEST_HOST)
125+
entitlements:
126+
path: Support/Kiwix-unitTest.entitlements
127+
properties:
128+
com.apple.security.app-sandbox: false
129+
# from macOS 14, sandbox and unit test are not working together on CI
130+
# a pop up appears that needs user acceptance
131+
# see: https://developer.apple.com/documentation/security/accessing-files-from-the-macos-app-sandbox
125132
sources:
126133
- path: Tests
127134
dependencies:

0 commit comments

Comments
 (0)