-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (67 loc) · 2.55 KB
/
unit-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: Unit Test
on:
pull_request:
branches:
- develop
jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
build:
name: Build and Test default scheme using iPhone simulator
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install and run 'bundle install'
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
- name: Install npm
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Amplify
run: npm install -g @aws-amplify/cli
- name: Setup Amplify
id: setupAmplify
run: bash ./update_amplify.sh -a $AWS_ACCESS_KEY_ID -s $AWS_SECRET_ACCESS_KEY -i $APP_ID -e $AMPLIFY_DEV_ENV -t $FACEBOOK_APP_ID -r $FACEBOOK_APP_SECRET
continue-on-error: true
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
APP_ID: ${{ secrets.APP_ID }}
AMPLIFY_DEV_ENV: ${{ secrets.AMPLIFY_DEV_ENV }}
FACEBOOK_APP_ID: ${{ secrets.FACEBOOK_APP_ID }}
FACEBOOK_APP_SECRET: ${{ secrets.FACEBOOK_APP_SECRET }}
- name: Recover From Setup Amplfy Error
if: steps.setupAmplify.outcome != 'success'
run: bash ./recover_from_error.sh
- name: Setup .mapbox file with MAPBOX_DOWNLOAD_TOKEN
run: echo $MAPBOX_DOWNLOAD_TOKEN >> ~/.mapbox
env:
MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_DOWNLOAD_TOKEN }}
- name: Setup .netrc with MAPBOX_DOWNLOAD_TOKEN
run: |
echo 'machine api.mapbox.com' >> ~/.netrc
echo 'login mapbox' >> ~/.netrc
echo "password $MAPBOX_DOWNLOAD_TOKEN" >> ~/.netrc
chmod 0600 ~/.netrc
env:
MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_DOWNLOAD_TOKEN }}
- name: Install Swiftgen
run: brew install swiftgen
- name: Check Amplify Version
run: amplify --version
- name: Set Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.1'
- name: Build For Test
run: |
xcodebuild test -scheme animeal -project animeal.xcodeproj -destination "platform=iOS Simulator,name=iPhone 14,OS=17.2" -parallelizeTargets -showBuildTimingSummary | xcbeautify --renderer github-actions