File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,34 @@ inputs:
9
9
description : ' The folder where the swift package is checked out'
10
10
required : true
11
11
default : ' .'
12
+ run-tests :
13
+ description : ' Whether to run the tests or just the build'
14
+ required : true
15
+ default : ' true'
16
+ android-api-level :
17
+ description : ' The API level of the Android emulator to run against'
18
+ required : true
19
+ default : 24
12
20
runs :
13
21
using : " composite"
14
22
steps :
23
+ - name : Cache Homebrew packages
24
+ uses : actions/cache@v4
25
+ with :
26
+ path : ~/Library/Caches/Homebrew
27
+ key : homebrew-packages
15
28
- name : Install Toolchain
16
- run : brew install swift-android-sdk/toolchain/swift-android-sdk@${{ inputs.swift-version }} skiptools/skip/skip
29
+ run : brew install skiptools/skip/skip swift-android-sdk/toolchain/swift-android-sdk@${{ inputs.swift-version }}
17
30
shell : bash
18
- - name : Build package
31
+ - name : Build Swift package for Android
19
32
run : skip android build --build-tests --package-path ${{ inputs.package-path }}
20
33
shell : bash
21
-
34
+ - name : Run Swift tests on Android emulator
35
+ if : ${{ inputs.run-tests == 'true' }}
36
+ uses : reactivecircus/android-emulator-runner@v2
37
+ with :
38
+ api-level : ${{ inputs.android-api-level }}
39
+ arch : x86_64
40
+ script : |
41
+ skip android test --package-path ${{ inputs.package-path }}
22
42
You can’t perform that action at this time.
0 commit comments