Skip to content

[WEBRTC-2347] [feat] Stats #169

[WEBRTC-2347] [feat] Stats

[WEBRTC-2347] [feat] Stats #169

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