-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (92 loc) · 3.87 KB
/
build_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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Build and test
on:
pull_request:
types:
- opened
- edited
- synchronize
jobs:
danger:
runs-on: ubuntu-latest
name: "Run Danger"
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Danger
uses: docker://ghcr.io/danger/danger-swift@sha256:36fc10dd9d02f09cf61cad6231a3f414d0d997d2 # 3.13.0
with:
args: --failOnErrors --no-publish-check --remove-previous-comments
env:
GITHUB_TOKEN: ${{ github.token }}
build-and-test:
needs: danger
runs-on: macos-13
timeout-minutes: 20
name: "Build and test"
steps:
- name: Cancel previous jobs
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # 0.11.0
with:
access_token: ${{ github.token }}
- name: Git - Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
ref: ${{ github.ref }}
- name: Select Xcode Version
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: '15.0'
# - name: Install SSH key
# uses: shimataro/ssh-key-action@v2
# with:
# key: ${{ secrets.SSH_KEY }}
# name: id_rsa_github_actions
# known_hosts: ${{ secrets.KNOWN_HOSTS }}
# - uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.SSH_KEY }}
- uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.172.0
with:
ruby-version: "3.2.2"
bundler-cache: true
- name: Setup node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
with:
node-version: 18.3.0
- run: npm install --save slack-message-builder
- name: Test & Build 🚀
run: |
bundle exec fastlane unit_tests
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
APPETIZE_API_TOKEN: ${{ secrets.APPETIZE_API_TOKEN }}
SOURCE_BRANCH: ${{ github.head_ref }}
PR_NUMBER: ${{ github.event.pull_request.number }}
# - name: Create Slack Success Summary Report
# if: ${{ success() && github.event.pull_request.base.ref == 'master' }}
# run: |
# node Report\ Scripts/appetize-success-report-script.js createAppetizeSummaryReport ${{ github.head_ref || github.ref_name }}
# - name: Slack Success Notification
# if: ${{ success() && github.event.pull_request.base.ref == 'master' }}
# uses: slackapi/[email protected]
# with:
# channel-id: ${{ secrets.SLACK_MOBILE_SDK_CHANNEL }}
# payload-file-path: '/var/tmp/appetize-success-link-summary.json'
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_REPORTER_BOT_TOKEN }}
# - name: Create Slack Failure Summary Report
# if: ${{ failure() && github.event.pull_request.base.ref == 'master' }}
# run: |
# node Report\ Scripts/appetize-failure-report-script.js createAppetizeSummaryReport ${{ github.head_ref || github.ref_name }}
# - name: Slack Notification
# if: ${{ failure() && github.event.pull_request.base.ref == 'master' }}
# uses: slackapi/[email protected]
# with:
# channel-id: ${{ secrets.SLACK_MOBILE_SDK_CHANNEL }}
# payload-file-path: '/var/tmp/appetize-failure-link-summary.json'
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_REPORTER_BOT_TOKEN }}