[Voice] - conferences and applications #169
Workflow file for this run
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: Test Python SDK | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: [ main ] | |
env: | |
KEY_ID: ${{ secrets.KEY_ID }} | |
KEY_SECRET: ${{ secrets.KEY_SECRET }} | |
PROJECT_ID: ${{ secrets.PROJECT_ID }} | |
NUMBERS_ORIGIN: ${{ secrets.NUMBERS_ORIGIN }} | |
SMS_ORIGIN: ${{ secrets.SMS_ORIGIN }} | |
CONVERSATION_ORIGIN: ${{ secrets.CONVERSATION_ORIGIN }} | |
AUTH_ORIGIN: ${{ secrets.AUTH_ORIGIN }} | |
DISABLE_SSL: ${{ secrets.DISABLE_SSL }} | |
PHONE_NUMBER: ${{ secrets.PHONE_NUMBER }} | |
ORIGIN_PHONE_NUMBER: ${{ secrets.ORIGIN_PHONE_NUMBER }} | |
APP_ID: ${{ secrets.APP_ID }} | |
EMPTY_PROJECT_ID: ${{ secrets.EMPTY_PROJECT_ID }} | |
TEMPLATES_ORIGIN: ${{ secrets.TEMPLATES_ORIGIN }} | |
APPLICATION_SECRET: ${{ secrets.APPLICATION_SECRET }} | |
APPLICATION_KEY: ${{ secrets.APPLICATION_KEY }} | |
VERIFICATION_ID: ${{ secrets.VERIFICATION_ID }} | |
VERIFICATION_ORIGIN: ${{ secrets.VERIFICATION_ORIGIN }} | |
VERIFICATION_REQUEST_SIGNATURE_TIMESTAMP: ${{ secrets.VERIFICATION_REQUEST_SIGNATURE_TIMESTAMP }} | |
VERIFICATION_REQUEST_WITH_EMPTY_BODY_SIGNATURE: ${{ secrets.VERIFICATION_REQUEST_WITH_EMPTY_BODY_SIGNATURE }} | |
VERIFICATION_REQUEST_SIGNATURE: ${{ secrets.VERIFICATION_REQUEST_SIGNATURE }} | |
VOICE_ORIGIN: ${{ secrets.VOICE_ORIGIN }} | |
VOICE_ORIGIN_PHONE_NUMBER: ${{ secrets.VOICE_ORIGIN_PHONE_NUMBER }} | |
VOICE_CALL_ID: ${{ secrets.VOICE_CALL_ID }} | |
CONFERENCE_ID: ${{ secrets.CONFERENCE_ID }} | |
CONFERENCE_CALL_ID: ${{ secrets.CONFERENCE_CALL_ID }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Lint with flake8 | |
run: | | |
flake8 sinch --count --max-complexity=10 --max-line-length=120 --statistics | |
- name: Checkout Wiremock fixtures repo | |
uses: actions/checkout@v3 | |
with: | |
repository: sinch/sinch-sdk-internal-specs | |
token: ${{ secrets.GH_PAT }} | |
ref: numbers_fixtures | |
path: sinch-sdk-internal-specs | |
- uses: actions/setup-node@v3 | |
- name: Install wait-port | |
run: | | |
npm install -g wait-port | |
- name: Test E2E with Pytest and Wiremock | |
run: | | |
cd sinch-sdk-internal-specs/fixtures/python/ && java -jar wiremock-studio-2.32.0-17.jar & | |
wait-port localhost:8000 | |
coverage run --source=. -m pytest | |
- name: Test coverage report | |
run: | | |
python -m coverage report |