Skip to content

Commit

Permalink
SWI-4079: Merging feature branch with main! (#91)
Browse files Browse the repository at this point in the history
* Remove all previous SDK remnants

* Add bandwidth.json spec

* Generate SDK using Openapi Generator CLI

```openapi-generator-cli generate -g csharp-netcore -i bandwidth.json -c openapi-config.yml```

* Add empty integration test files

* add .vscode to gitignore

* Remove vscode files

* SWI-1670: Refactoring .NET Verbs  (#69)

* SWI-1645: adding Root BXML verbs

* SWI-1645: Update test file name

* SWI-1645: Update test file name one more time

* SWI-1645: Update versions of actions used in test workflow

* SWI-1645: Update runner version

* SWI-1645: Update action versions in deploy action

* SWI-1670: Revert changes to old BXML

* SWI-1670: Updated serialization library used

* SWI-1670: Adding new Verbs

* SWI-1670: Updating gitignore

* SWI-1670: Updating verbs

* SWI-1670: Update Conference file to be uppercase

* Update .github/workflows/deploy.yml

Co-authored-by: AJ Rice <53190766+ajrice6713@users.noreply.github.com>

* SWI-1670: Fixing comments and adding getters and setters where they were missing

---------

Co-authored-by: AJ Rice <53190766+ajrice6713@users.noreply.github.com>

* SWI-3245: Write Tests for the BXML Verbs (#70)

* SWI-3245: Adding test files for verbs

* SWI-3245: Adding test files for verbs for real

* SWI-3245: all tests are written

* SWI-3245: Adding DS_store to gitignore

* SWI-3245: Add missing package

* SWI-3245: Update netcore framework version used

* SWI-3245: Fixing tests

* SWI-3245: Updating tests again

* SWI-3245: Update tests

* SWI-3245: Add space to expected string for verbs with no attributes & context

* SWI-3245: Update Tests to Target .NET 6 & 7

* SWI-1687: [.NET] Unit Tests for API Models (#71)

* SWI-1687: Updating OpenAPI generated tests

* SW-1687: finished up tests

* SWI-1687: Formatting changes

* SWI:1687: Update config files

* SWI-1687: Remove additionalProperties tag in config file

* Update openapi-config.yml

Co-authored-by: Cameron Koegel <53310569+ckoegel@users.noreply.github.com>

* SWI-1687: I wanted it in alphabetical order

---------

Co-authored-by: Cameron Koegel <53310569+ckoegel@users.noreply.github.com>

* SWI-3341: Update to OpenAPI Generator 7.0.0 (#72)

* SWI-3342: generated with newest API spec file and added a new test (#73)

* SWI-1680: [.NET] Unit Tests for APIs (#74)

* SWI-3342: generated with newest API spec file and added a new test

* SWI-1680: Added API Unit tests

* SWI-1680: Update Test csproj file

* SWI-1680: Trying to fix tests with streams

* SWI-1632: [.NET] API Integration Tests (#75)

* SWI-1632: Working on API integration tests

* SWI-1632: Finished integration tests

* SWI-1632: Added environment variables to workflows

* SWI-1632: Added forbidden user & pass to workflows

* SWI-1632: Added rate limit test

* SWI-1632: Updating request to number

* SWI-1632: Trying to get media tests to work

* SWI-1632: General reformatting

* SWI-1694: Update test and deployment workflows (#76)

* SWI-1694: Updated test workflows

* SWI-1694: Adding feature branch to nightly test

* SWI-1694: Update deploy workflow

* SWI-1694: Update deploy to handle pre-releases

* SWI-1694: Update deployment workflow (#77)

* SWI-1694: Updated test workflows

* SWI-1694: Adding feature branch to nightly test

* SWI-1694: Update deploy workflow

* SWI-1694: Update deploy to handle pre-releases

* SWI-1694: fix conditional statement

* SWI-1694: Updated regex

* SWI-1694: Update CODEOWNERS

* SWI-1694: Updating echo command to be nicer

* SWI-1695: updating the regex again (#78)

* SWI-1695: Fix regex for new releases (#79)

* SWI-1695: updating the regex again

* SWI-1695: updating the regex again pt.2

* SWI-1695: removed comment

* SWI-1695: Update quotes

* SWI-1695: Adding a missing environment variable (#80)

* SWI-1695: updating the regex again

* SWI-1695: updating the regex again pt.2

* SWI-1695: removed comment

* SWI-1695: Update quotes

* SWI-1695: Add missing environment variable

* Update deploy.yml

* SWI-1695: Updated env vars

* SWI-1696:  Finishing touches before beta release (#81)

* SWI-1696:  Update csproj and openapi ignore files

* Update src/Bandwidth.Standard/Bandwidth.Standard.csproj

Co-authored-by: AJ Rice <53190766+ajrice6713@users.noreply.github.com>

* Update src/Bandwidth.Standard/Bandwidth.Standard.csproj

Co-authored-by: AJ Rice <53190766+ajrice6713@users.noreply.github.com>

---------

Co-authored-by: AJ Rice <53190766+ajrice6713@users.noreply.github.com>

* SWI-3915: Regenerate C# SDK and add tests for new endpoint (#82)

* SWI-3915: Regenerated SDK & added tests for new endpoint

* SWI-3915: Uncomment [Fact]

* SWI-3915: Fix list calls api test

* SWI-3933: Regenerated with version 7.1.0 (#83)

* SWI-3945: Adding "update-sdk" workflow (#84)

* SWI-3945: Add an update SDK workflow

* Update .github/workflows/update-sdk.yml

Co-authored-by: Cameron Koegel <53310569+ckoegel@users.noreply.github.com>

---------

Co-authored-by: Cameron Koegel <53310569+ckoegel@users.noreply.github.com>

* SWI-4077: Remove the update-sdk workflow (#90)

---------

Co-authored-by: AJ Rice <53190766+ajrice6713@users.noreply.github.com>
Co-authored-by: Cameron Koegel <53310569+ckoegel@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 22, 2023
1 parent 8e57d54 commit 996509f
Show file tree
Hide file tree
Showing 583 changed files with 84,854 additions and 25,329 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Global rule:
* @Bandwidth/dx
* @Bandwidth/band-swi @Bandwidth/band-swi-github-repo-admin
126 changes: 103 additions & 23 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,123 @@
name: Deploy
name: Deploy SDK

on:
release:
types:
- published

env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN}}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN}}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
OPERATING_SYSTEM: ubuntu-latest
DOTNET_VERSION: 7.0.x

jobs:
publish:
name: Publish
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'main' }}
env:
BW_PROJECT_NAME: Bandwidth.Standard
BW_PROJECT_TEST_NAME: Bandwidth.StandardTests
deploy_pre_release:
name: Deploy OpenAPI Generator Client Pre-Release
if: ${{ github.event.release.prerelease && github.event.release.target_commitish == 'feature/openapi-generator-sdk' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

env:
BW_PROJECT_NAME: src/Bandwidth.Standard
BW_PROJECT_TEST_NAME: src/Bandwidth.Standard.Test
steps:
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV

- name: Check Release Tag Format
run: |
if ! [[ $RELEASE_VERSION =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(beta|alpha|rc))(\.[0-9][0-9]*)?$ ]]; then
echo 'Tag does not match expected regex pattern for beta releases (^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(beta|alpha|rc))(\.[0-9][0-9]*)?$)'
echo $RELEASE_VERSION
echo 'Please update your tag to match the expected regex pattern'
exit 1
fi
- name: Checkout
uses: actions/checkout@v3
with:
ref: feature/openapi-generator-sdk

- uses: actions/setup-dotnet@v3
- name: Setup Dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0"
dotnet-version: '7.0.x'

- name: Run integration tests
env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
- name: Run functional tests
run: dotnet test $BW_PROJECT_TEST_NAME

- name: Pack NuGet package
run: dotnet pack --configuration Release $BW_PROJECT_NAME -p:PackageVersion=$RELEASE_VERSION

- name: Publish NuGet package
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
NUGET_SOURCE: https://api.nuget.org/v3/index.json
run: dotnet nuget push $BW_PROJECT_NAME/bin/Release/*.nupkg -s $NUGET_SOURCE -k $NUGET_KEY

- name: Notify Slack of build status
uses: Bandwidth/build-notify-slack-action@v1.0.0
if: always()
with:
job-status: ${{ job.status }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}

deploy:
name: deploy 'main' branch
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'main' }}
runs-on: ubuntu-latest
env:
BW_PROJECT_NAME: src/Bandwidth.Standard
BW_PROJECT_TEST_NAME: src/Bandwidth.Standard.Test
steps:
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV

- name: Check Release Tag Format
run: |
if ! [[ $RELEASE_VERSION =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
echo 'Tag does not match expected regex pattern for releases (^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$)'
echo $RELEASE_VERSION
echo 'Please update your tag to match the expected regex pattern'
exit 1
fi
- name: Checkout
uses: actions/checkout@v3

- name: Setup Dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'

- name: Run functional tests
run: dotnet test $BW_PROJECT_TEST_NAME

- name: Pack NuGet package
run: dotnet pack --configuration Release $BW_PROJECT_NAME -p:PackageVersion=$RELEASE_VERSION

- name: Publish NuGet package
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
NUGET_SOURCE: https://api.nuget.org/v3/index.json
run: dotnet nuget push $BW_PROJECT_NAME/bin/Release/*.nupkg -s $NUGET_SOURCE -k $NUGET_KEY

- name: Notify Slack of build status
uses: Bandwidth/build-notify-slack-action@v1.0.0
if: always()
with:
job-status: ${{ job.status }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
82 changes: 82 additions & 0 deletions .github/workflows/test-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Test Main Branch Nightly
on:
schedule:
- cron: "0 4 * * *"

env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN}}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN}}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}

jobs:
test_main:
name: Test Main Branch Nightly
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019, ubuntu-22.04, ubuntu-20.04]
dotnet: [6.0.x, 7.0.x]
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: "main"

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}

- name: Run functional tests
env:
OPERATING_SYSTEM: ${{ matrix.os }}
DOTNET_VERSION: ${{ matrix.dotnet }}
run: dotnet test src/Bandwidth.Standard.Test

test_feature:
name: Test Feature Branch Nightly
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019, ubuntu-22.04, ubuntu-20.04]
dotnet: [6.0.x, 7.0.x]
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: "feature/openapi-generator-sdk"

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}

- name: Run functional tests
env:
OPERATING_SYSTEM: ${{ matrix.os }}
DOTNET_VERSION: ${{ matrix.dotnet }}
run: dotnet test src/Bandwidth.Standard.Test

notify_for_failures:
name: Notify for failures
needs: [test_main, test_feature]
if: failure()
runs-on: ubuntu-latest
steps:
- name: Notify Slack of failures
uses: Bandwidth/build-notify-slack-action@v1.0.0
with:
job-status: failure
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
43 changes: 43 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test PR
on:
pull_request:
workflow_dispatch:

env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN}}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN}}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}

jobs:
test_pr:
name: Test PR
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019, ubuntu-22.04, ubuntu-20.04]
dotnet: [6.0.x, 7.0.x]
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}

- name: Run functional tests
env:
OPERATING_SYSTEM: ${{ matrix.os }}
DOTNET_VERSION: ${{ matrix.dotnet }}
run: dotnet test src/Bandwidth.Standard.Test
49 changes: 0 additions & 49 deletions .github/workflows/test.yml

This file was deleted.

Loading

0 comments on commit 996509f

Please sign in to comment.