diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d1e43276a..c47b1c3fd 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -52,10 +52,6 @@ jobs: - name: Install python dependencies run: pip install pyyaml==6.0.1 - - name: Remove Apple Pay capability for macOS - if: matrix.platform == 'macOS' - run: sed -i '' '/in-app-payments/d' project.yml - - name: Set VERSION from code shell: python run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d0fe5b61..9184f6194 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,16 +34,15 @@ jobs: ref: ${{ github.event.pull_request.head.sha || github.ref }} - name: Add Apple Store Key - if: matrix.platform == 'iOS' run: echo "${{ secrets.APPLE_STORE_AUTH_KEY }}" | base64 --decode -o ${{ env.APPLE_STORE_AUTH_KEY_PATH}} - - name: Set EXTRA_XCODEBUILD + - name: Set EXTRA_XCODEBUILD for iOS if: matrix.platform == 'iOS' run: echo "EXTRA_XCODEBUILD=-sdk iphoneos ${{ env.APPLE_AUTH_PARAMS }}" >> $GITHUB_ENV - - name: Remove Apple Pay capability for macOS + - name: Set EXTRA_XCODEBUILD for macOS if: matrix.platform == 'macOS' - run: sed -i '' '/in-app-payments/d' project.yml + run: echo "EXTRA_XCODEBUILD=${{ env.APPLE_AUTH_PARAMS }}" >> $GITHUB_ENV - name: Build uses: ./.github/actions/xcbuild @@ -59,6 +58,12 @@ jobs: if: matrix.platform == 'iOS' run: xcodebuild test -scheme Kiwix -destination 'platform=iOS Simulator,name=iPhone 15 Plus' + - name: Remove in-app-payments capability for unit tests on macOS + if: matrix.platform == 'macOS' + run: | + sed -i '' '/in-app-payments/d' project.yml + xcodegen + - name: Run Unit Tests on macOS if: matrix.platform == 'macOS' run: xcodebuild test -scheme Kiwix -destination 'platform=macOS'