-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
148 additions
and
115 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: CD | ||
name: Release new package version | ||
|
||
on: | ||
push: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
name: Test native | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- 'android/**' | ||
- 'ios/**' | ||
workflow_dispatch: | ||
|
||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer | ||
CP_HOME_DIR: ${{ github.workspace }}/.cocoapods | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'main' }} | ||
|
||
jobs: | ||
expo_fingerprint: | ||
name: Calculate fingerprint | ||
runs-on: ubuntu-latest | ||
outputs: | ||
fingerprint: ${{ steps.expo-fingerprint.outputs.fingerprint }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/npm-install | ||
- uses: ./.github/actions/expo-fingerprint | ||
id: expo-fingerprint | ||
prebuild_android: | ||
name: Expo prebuild Android | ||
runs-on: ubuntu-latest | ||
needs: [expo_fingerprint] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/npm-install | ||
- uses: ./.github/actions/expo-prebuild | ||
with: | ||
key: ${{ needs.expo_fingerprint.outputs.fingerprint }} | ||
platform: android | ||
prebuild_ios: | ||
name: Expo prebuild iOS | ||
runs-on: ubuntu-latest | ||
needs: [expo_fingerprint] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/npm-install | ||
- uses: ./.github/actions/expo-prebuild | ||
with: | ||
key: ${{ needs.expo_fingerprint.outputs.fingerprint }} | ||
platform: ios | ||
test_android: | ||
name: Test Android | ||
# Can't run on macos-latest: https://github.com/ReactiveCircus/android-emulator-runner/issues/392 | ||
runs-on: macos-13 | ||
needs: [prebuild_android] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/npm-install | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: ./example/android | ||
name: ${{ needs.prebuild_android.outputs.artifact }} | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
- name: Cache Gradle packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Test Android Module | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 34 | ||
force-avd-creation: false | ||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
target: google_apis | ||
arch: x86_64 | ||
working-directory: ./example/android | ||
script: ./gradlew expo-signature:connectedAndroidTest | ||
disable-animations: true | ||
test_ios: | ||
name: Test iOS | ||
runs-on: macos-latest | ||
needs: [prebuild_ios] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/npm-install | ||
- name: Cache CocoaPods | ||
id: cocoapods-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.CP_HOME_DIR }} | ||
key: ${{ runner.os }}-pods | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: ./example/ios | ||
name: ${{ needs.prebuild_ios.outputs.artifact }} | ||
- uses: irgaly/xcode-cache@v1 | ||
with: | ||
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }} | ||
restore-keys: xcode-cache-deriveddata-${{ github.workflow }}- | ||
- uses: ./.github/actions/npm-install | ||
- name: Pod install | ||
working-directory: ./example/ios | ||
run: pod install | ||
- name: Test iOS Module | ||
working-directory: ./example | ||
run: | | ||
xcodebuild test \ | ||
-workspace ios/exposignatureexample.xcworkspace \ | ||
-scheme SignatureModule-Unit-Tests \ | ||
-destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=latest' |