test member #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request | |
on: | |
# Dangerious without Member Check setep! | |
pull_request_target: | |
# branches: | |
# - dev | |
jobs: | |
static-analysis: | |
runs-on: macos-latest | |
steps: | |
- name: Test | |
run: echo "Test (should fail - missing OWNER)" | |
- name: Member Check | |
if: ${{ github.event.pull_request.author_association != 'MEMBER' }} | |
run: | | |
echo "Pull Request not triggered by a MSDK team member. \n\n-> Someone from the team needs to rerun this workflow AFTER it has been deemed safe." | |
exit 1 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 100 | |
ref: ${{ github.event.pull_request.head.sha }} # This is dangerous without the first access check | |
- name: Install Dependencies | |
run: | | |
npm install [email protected] | |
./install.sh | |
- name: Run Static Analysis | |
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 | |
- name: Report Static Analysis | |
env: | |
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cd .github/DangerFiles | |
bundle update && bundle install | |
bundle exec danger --dangerfile=StaticAnalysis.rb --danger_id=StaticAnalysis | |
test-orchestrator: | |
runs-on: macos-latest | |
outputs: | |
libs: ${{ steps.test-orchestrator.outputs.libs }} | |
steps: | |
- name: Member Check | |
if: ${{ github.event.pull_request.author_association != 'MEMBER' }} | |
run: | | |
echo "Pull Request not triggered by a MSDK team member. \n\n-> Someone from the team needs to rerun this workflow AFTER it has been deemed safe." | |
exit 1 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 100 | |
ref: ${{ github.event.pull_request.head.sha }} # This is dangerous without the first access check | |
- name: Determine Tests to Run | |
id: test-orchestrator | |
env: | |
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cd .github/DangerFiles | |
bundle update && bundle install | |
bundle exec danger --dangerfile=TestOrchestrator.rb | |
ios-pr: | |
needs: [test-orchestrator] | |
strategy: | |
fail-fast: false | |
matrix: | |
lib: ${{ fromJson(needs.test-orchestrator.outputs.libs) }} | |
uses: ./.github/workflows/reusable-workflow.yaml | |
with: | |
lib: ${{ matrix.lib }} | |
secrets: inherit |