-
Notifications
You must be signed in to change notification settings - Fork 12
66 lines (59 loc) · 1.98 KB
/
ios_fastlane_tests.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
name: ios_fastlane_tests
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
pull_request:
jobs:
tests:
name: ios_fastlane_tests
runs-on: macos-latest
env:
TELNYX_SIP_API_KEY: ${{ secrets.TELNYX_SIP_API_KEY }}
TELNYX_SIP_CONNECTION_ID: ${{ secrets.TELNYX_SIP_CONNECTION_ID }}
TELNYX_SIP_USER: ${{ secrets.TELNYX_SIP_USER }}
TELNYX_SIP_PASSWORD: ${{ secrets.TELNYX_SIP_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.4.0'
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.4
bundler-cache: true
- name: On-demand Credentials
id: ondemand_creds
run: |
echo "::set-output name=response::$(curl -X POST \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $TELNYX_SIP_API_KEY" \
--data '{
"connection_id": "${{ env.TELNYX_SIP_CONNECTION_ID }}"
}' \
https://api.telnyx.com/v2/telephony_credentials)"
- name: Generate Token
id: generate_token
run: |
echo "::set-output name=response::$(curl -X POST \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $TELNYX_SIP_API_KEY" \
--data '{}' \
--url "https://api.telnyx.com/v2/telephony_credentials/${{ fromJson(steps.ondemand_creds.outputs.response).data.id }}/token")"
- shell: bash
run: |
sh scripts/setup_env.sh -u "$TELNYX_SIP_USER" -p "$TELNYX_SIP_PASSWORD" -t "${{ steps.generate_token.outputs.response }}"
- name: Setup Fastlane
run: |
bundle install
- name: Install Pods
run: |
pod install
- name: Sleep for 10 seconds
run: |
sleep 10
- name: Run tests
run: |
bundle exec fastlane tests