-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (60 loc) · 2.01 KB
/
smoke-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Smoke test App
env:
ARCHIVE_QUIET_MODE: 1
on:
workflow_dispatch:
# These permissions are needed to interact with GitHub's OIDC Token endpoint
permissions:
id-token: write
contents: write
packages: read
jobs:
build-smoke-tests-app:
timeout-minutes: 40
runs-on: [macos-14]
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
timeout-minutes: 5
- name: xcodebuild
env:
PROJECT_DIR: ./Examples/BrandGame
PROJECT_NAME: BrandGame.xcodeproj
SCHEME: BrandGame
IS_XCTEST: true # Needed to disable SwiftLint -> SwiftSyntax plugin dependency build issue
run: |
set -o pipefail
ROOT_DIR=`pwd`
DERIVED_DATA_DIR="$PROJECT_DIR/.build/DerivedData"
xcodebuild build -verbose -project "$PROJECT_DIR/$PROJECT_NAME" \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \
-scheme $SCHEME \
-sdk iphonesimulator \
-derivedDataPath $DERIVED_DATA_DIR \
cd $DERIVED_DATA_DIR/Build/Products/Debug-iphonesimulator
zip -r BrandGame.zip BrandGame.app
mv BrandGame.zip $ROOT_DIR/BrandGame.zip
cd $ROOT_DIR
- name: Upload Artifiact
uses: actions/upload-artifact@v4
with:
name: TestApp
path: BrandGame.zip
run-smoke-test:
needs: build-smoke-tests-app
uses: embrace-io/actions/.github/workflows/smoke-test.yml@master
secrets: inherit
with:
LaunchCommand: xcrun simctl launch booted
KillAppCommand: xcrun simctl terminate booted io.embrace.BrandGame
BundleID: io.embrace.BrandGame
Tests: AnySessionMetadata
TestArtifact: TestApp
InstallCommand: |
rm -rf BrandGame.app;
unzip BrandGame.zip;
xcrun simctl shutdown all && xcrun simctl erase all;
xcrun simctl boot "iPhone 14" || true;
xcrun simctl uninstall booted io.embrace.BrandGame || true;
xcrun simctl install booted BrandGame.app