forked from forcedotcom/SalesforceMobileSDK-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.55 KB
/
pr.yaml
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
name: Pull Request
on:
pull_request:
# branches:
# - dev
jobs:
static-analysis:
runs-on: macos-latest
outputs:
libs: ${{ steps.danger.outputs.libs }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 100
- name: Install Dependencies
run: |
npm install [email protected]
./install.sh
- name: Static Analysis and Danger
if: ${{ github.event_name == 'pull_request' }} && (success() || failure())
# id: danger
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# xcodebuild analyze -workspace SalesforceMobileSDK.xcworkspace -scheme MobileSync -sdk 'iphonesimulator' \
# CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR=./clangReport RUN_CLANG_STATIC_ANALYZER=YES | xcbeautify
cd .github
bundle update && bundle install
bundle exec danger --dangerfile=DangerStaticAnalysis.rb
- name: Test
run: cat libs_to_run.txt
- name: Set Libs Value
id: danger
run: echo "$(cat libs_to_run.txt)" >> $GITHUB_OUTPUT
- name: Test print
run: echo ${{ steps.danger.outputs.libs }}
ios-pr:
needs: [static-analysis]
strategy:
fail-fast: false
matrix:
lib: ${{ needs.static-analysis.outputs.libs }}
# lib: [SalesforceSDKCommon, SalesforceAnalytics, SalesforceSDKCore, SmartStore, MobileSync]
uses: ./.github/workflows/reusable-workflow.yaml
with:
lib: ${{ matrix.lib }}