Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/actions/validate/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions .github/actions/validate/action.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/actions/validate/entrypoint.sh

This file was deleted.

27 changes: 21 additions & 6 deletions .github/workflows/validate.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
name: Validate SDK
name: Test

on:
schedule:
- cron: "0 4 * * *"
pull_request:
workflow_dispatch:

jobs:
deploy:
name: Validate SDK
runs-on: ubuntu-latest
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2016, windows-2019, ubuntu-18.04, ubuntu-20.04]
php-version: [7.4, 8.0]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Validate
uses: ./.github/actions/validate

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Install Packages
run: composer install

- name: Test
env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
Expand All @@ -23,6 +36,8 @@ jobs:
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
run: ./vendor/bin/phpunit tests

- uses: Bandwidth/build-notify-slack-action@v1.0.0
if: failure() && !github.event.pull_request.draft
with:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Bandwidth PHP SDK

[![Test](https://github.com/Bandwidth/php-sdk/actions/workflows/test.yaml/badge.svg)](https://github.com/Bandwidth/php-sdk/actions/workflows/test.yaml)

| **OS** | **PHP** |
|:---:|:---:|
| Windows 2016 | 7.4, 8.0 |
| Windows 2019 | 7.4, 8.0 |
| Ubuntu 18.04 | 7.4, 8.0 |
| Ubuntu 20.04 | 7.4, 8.0 |

## Getting Started

### Installation
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
syntaxCheck="true"
verbose="true"
>
<testsuites>
Expand Down
3 changes: 1 addition & 2 deletions tests/ApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ public function testMfaVoice() {

public function testMfaVerify() {
$body = new BandwidthLib\MultiFactorAuth\Models\TwoFactorVerifyRequestSchema();
$body->from = getenv("BW_NUMBER");
$body->to = getenv("USER_NUMBER");
$body->to = "+".rand(10000000000, 19999999999);
$body->applicationId = getenv("BW_VOICE_APPLICATION_ID");
$body->scope = "scope";
$body->code = "123456";
Expand Down