-
Notifications
You must be signed in to change notification settings - Fork 21
48 lines (41 loc) · 1.32 KB
/
build-and-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
name: Build and Test
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-test-ios:
runs-on: macos-12
steps:
- name: Checkout repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
persist-credentials: false
- name: Restore Gems Cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: vendor/bundle
key: app-${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
app-${{ runner.os }}-gems-
- name: Install Bundle
env:
BUNDLE_PATH: vendor/bundle
run: |
bundle config set --local path $BUNDLE_PATH
bundle check || bundle install
- name: Install Pods
run: |
bundle exec pod install
- name: Test AppSyncRealTimeClient
run: xcodebuild test -workspace AppSyncRealTimeClient.xcworkspace -scheme AppSyncRealTimeClient -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}