@@ -58,18 +58,62 @@ jobs:
5858 --form 'payload=@"example/android/app/build/outputs/apk/release/app-release.apk"' \
5959 --form 'name="app-release.apk"'
6060 - name : Run tests
61- run : cd example && npm run wdio.sauce
61+ run : cd example && npm run wdio.android. sauce
6262 build-ios :
6363 needs : version-check
6464 runs-on : macos-latest
65+ permissions : read-all
66+ environment : integration
67+ env :
68+ SAUCE_USERNAME : ${{ secrets.SAUCE_USERNAME }}
69+ SAUCE_ACCESS_KEY : ${{ secrets.SAUCE_ACCESS_KEY }}
70+ SAUCE_TUNNEL_ID : ${{ secrets.SAUCE_TUNNEL_ID }}
6571 steps :
66- - uses : actions/checkout@v3
67- - uses : actions/setup-node@v3
68- with :
69- node-version : ' 18'
70- cache : ' npm'
71- - run : npm ci
72- - run : npm run bootstrap
73- - name : Build ios
74- run : cd example/ios && xcodebuild -workspace SplunkOtelReactNativeExample.xcworkspace -scheme SplunkOtelReactNativeExample -configuration Debug CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
75-
72+ - uses : actions/checkout@v3
73+ - uses : actions/setup-node@v3
74+ with :
75+ node-version : ' 18'
76+ cache : ' npm'
77+ - name : Download sc binary for os x
78+ run : |
79+ SC_VERSION="4.9.1"
80+ SC_ARCH="x64"
81+ SC_DIR="$RUNNER_TOOL_CACHE/sc/$SC_VERSION/$SC_ARCH"
82+ mkdir -p $SC_DIR
83+ mkdir -p $SC_DIR.complete
84+ curl -L https://saucelabs.com/downloads/sc-$SC_VERSION-osx.zip -o $SC_DIR/sc-$SC_VERSION-osx.zip
85+ unzip $SC_DIR/sc-$SC_VERSION-osx.zip -d $SC_DIR
86+ mv $SC_DIR/sc-$SC_VERSION-osx $SC_DIR/sc-$SC_VERSION-linux
87+ - name : Setup sauce connect
88+ uses : saucelabs/sauce-connect-action@v2
89+ with :
90+ username : ${{ secrets.SAUCE_USERNAME }}
91+ accessKey : ${{ secrets.SAUCE_ACCESS_KEY }}
92+ tunnelName : ${{ secrets.SAUCE_TUNNEL_ID }}
93+ noSSLBumpDomains : all
94+ scVersion : ' 4.9.1'
95+ - run : npm ci
96+ - run : npm run bootstrap
97+ - name : Build iOS
98+ run : |
99+ cd example/ios && \
100+ xcodebuild \
101+ -workspace SplunkOtelReactNativeExample.xcworkspace \
102+ -scheme SplunkOtelReactNativeExample \
103+ -derivedDataPath './iosSimBuild' \
104+ -sdk iphonesimulator \
105+ -arch x86_64 \
106+ -configuration Release \
107+ CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
108+ - name : Zip iOS build
109+ run : |
110+ cd example/ios/iosSimBuild/Build/Products/Release-iphonesimulator && \
111+ zip -r SplunkOtelReactNativeExample.zip SplunkOtelReactNativeExample.app
112+ - name : Upload zip to saucelabs
113+ run : |
114+ curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
115+ --request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \
116+ --form 'payload=@"example/ios/iosSimBuild/Build/Products/Release-iphonesimulator/SplunkOtelReactNativeExample.zip"' \
117+ --form 'name="SplunkOtelReactNativeExample.zip"'
118+ - name : Run tests
119+ run : cd example && npm run wdio.ios.sauce
0 commit comments