-
Notifications
You must be signed in to change notification settings - Fork 180
52 lines (51 loc) · 1.48 KB
/
test-ios.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
name: test-ios
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
jobs:
test:
if: >
github.event_name == 'push' ||
github.event_name == 'pull_request' &&
!contains(github.event.pull_request.head.ref, 'main')
name: "ios test on feature branches"
runs-on: macos-11
steps:
- name: Get HEAD to fetch
id: fetch-head
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
echo "::set-output name=ref::${{ github.ref }}"
else
echo "::set-output name=ref::refs/pull/${{ github.event.pull_request.number }}/merge"
fi
- uses: actions/checkout@v2
with:
ref: ${{ steps.fetch-head.outputs.ref }}
- uses: actions/setup-java@v1
with:
java-version: '11'
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_12.5.1.app'
- name: Show Xcode version
run: xcodebuild -version
- uses: eskatos/gradle-command-action@v1
with:
arguments: iosTest
dependencies-cache-key: |
**/*.gradle
**/*.gradle.kts
buildSrc/src/**/*.kt
**/gradle.properties
gradle/**
- uses: actions/upload-artifact@v2
if: cancelled() != true
with:
name: unit-test-ios-reports
path: |
**/reports
!buildSrc/build/reports
retention-days: 14