-
Notifications
You must be signed in to change notification settings - Fork 4
74 lines (69 loc) · 2.43 KB
/
sdk-primary.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
72
73
name: Lint Build and Test
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.PAT_IOS_CERTIFICATES_REPO_B64 }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
ISSUER_ID: ${{ secrets.ISSUER_ID }}
KEY_ID: ${{ secrets.KEY_ID }}
APPSTORE_CONNECT_PRIVATE_KEY: ${{ secrets.APPSTORE_CONNECT_PRIVATE_KEY }}
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 10
jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Danger
uses: docker://ghcr.io/danger/danger-swift-with-swiftlint:3.15.0
with:
args: --failOnErrors --no-publish-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
name: "Build App and Run Unit Tests"
# TODO: Change back to macos-latest once it points to macOS 14 (Q2 '24)
runs-on: macos-14
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install bundle
run: bundle install
- name: Update Compile Sources
run: ruby ./Scripts/update_compile_sources.rb
- name: Write Smile Config
id: write_smile_config
# Mask the config so that it doesn't show up in the logs
run: |
INPUT_SMILE_CONFIG=$(jq -r '.inputs.smile_config // empty' $GITHUB_EVENT_PATH)
echo "::add-mask::$INPUT_SMILE_CONFIG"
if [ -n "$INPUT_SMILE_CONFIG" ]; then
SMILE_CONFIG="$INPUT_SMILE_CONFIG"
else
SMILE_CONFIG="$SMILE_CONFIG_PARTNER_002"
fi
echo "$SMILE_CONFIG" > smile_config.json
PARTNER_ID=$(jq -r '.partner_id' smile_config.json)
echo "partner_id=$PARTNER_ID" >> $GITHUB_OUTPUT
env:
SMILE_CONFIG_PARTNER_002: ${{ secrets.SMILE_CONFIG_PARTNER_002 }}
- name: Add Smile Config to Xcode Project
run: ruby add_smile_config.rb
- name: Setup Environment
uses: ./.github/actions/setup
with:
xcode: '15.2'
- name: Build Example app and Run Unit Tests
run: |
xcodebuild -resolvePackageDependencies
bundle exec rake test:spm
bundle exec rake provision:ios
bundle exec rake test:package
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}