Skip to content

Commit

Permalink
Merge pull request #36 from Bandwidth/DX-2238
Browse files Browse the repository at this point in the history
DX-2238 Add Matrix Testing
  • Loading branch information
ajrice6713 authored Sep 30, 2021
2 parents b42fe15 + c7d32fb commit 86e5092
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 30 deletions.
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/[email protected]
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

0 comments on commit 86e5092

Please sign in to comment.