Repository navigation
docs: move description above the hero image #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: ['master', 'main'] | |
| pull_request: | |
| permissions: {} | |
| jobs: | |
| web: | |
| name: Web (lint + build + test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npm run build | |
| - run: npm run test | |
| android: | |
| name: Android (build + unit tests) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| # capacitor-android is a gradle subproject resolved from node_modules, so install deps first | |
| - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - run: npm ci | |
| # capacitor-android 7.x compiles with source release 21 | |
| - uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| - uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2 | |
| - run: sdkmanager "platforms;android-36" "build-tools;36.0.0" | |
| - name: Gradle build + unit tests | |
| working-directory: android | |
| run: ./gradlew build | |
| ios: | |
| name: iOS (build + XCTest) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| # NOTE: the plugin uses iOS 26 APIs (SecureEnclave.MLDSA / MLKEM), so this needs the iOS 26 | |
| # SDK (Xcode 26). Verified locally on Xcode 26.2. Pin DEVELOPER_DIR at the runner's Xcode 26. | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode.app | |
| - name: Xcode version | |
| run: xcodebuild -version | |
| # Capacitor is a pod resolved from node_modules, so install deps first | |
| - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - run: npm ci | |
| # podspec packaging sanity (compiles the pod on its own) | |
| - name: Lint the podspec | |
| run: pod lib lint CapacitorPqSecureStorage.podspec --allow-warnings | |
| # generate the Xcode test project and run the XCTest suite on a simulator | |
| - name: Install XcodeGen | |
| run: brew install xcodegen | |
| - name: Generate project + install pods | |
| working-directory: ios | |
| run: | | |
| xcodegen generate | |
| pod install | |
| - name: Pick an available iOS simulator | |
| id: sim | |
| run: | | |
| udid=$(xcrun simctl list devices available -j \ | |
| | jq -r '[.devices | to_entries[] | select(.key | test("iOS")) | .value[] | select(.isAvailable and (.name | test("iPhone")))][0].udid') | |
| echo "udid=$udid" >> "$GITHUB_OUTPUT" | |
| - name: Run XCTest | |
| working-directory: ios | |
| run: | | |
| xcodebuild test \ | |
| -workspace Plugin.xcworkspace \ | |
| -scheme Plugin \ | |
| -destination "platform=iOS Simulator,id=${{ steps.sim.outputs.udid }}" \ | |
| CODE_SIGNING_ALLOWED=NO |