Skip to content

Commit dc1fc1e

Browse files
committed
Merge branch 'main' of https://github.com/Bandwidth/ruby-sdk into feature/openapi-generator-sdk
2 parents 90f420e + f674612 commit dc1fc1e

File tree

2 files changed

+118
-2
lines changed

2 files changed

+118
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,72 @@ jobs:
3838
uses: ./.github/actions/deploy
3939
env:
4040
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
41+
42+
- uses: Bandwidth/[email protected]
43+
if: always()
44+
with:
45+
job-status: ${{ job.status }}
46+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
47+
slack-channel: ${{ secrets.SLACK_CHANNEL }}
48+
49+
deploy_pre_release:
50+
name: Deploy OpenAPI Generator Client Pre-Release to Rubygems
51+
if: ${{ github.event.release.prerelease && github.event.release.target_commitish == 'feature/openapi-generator-sdk' }}
52+
runs-on: ubuntu-latest
53+
env:
54+
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
55+
BW_USERNAME: ${{ secrets.BW_USERNAME }}
56+
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
57+
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
58+
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
59+
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
60+
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
61+
BW_NUMBER: ${{ secrets.BW_NUMBER }}
62+
USER_NUMBER: ${{ secrets.USER_NUMBER }}
63+
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
64+
RUBY_VERSION: '3.0'
65+
OPERATING_SYSTEM: 'ubuntu'
66+
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
67+
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
68+
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
69+
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
70+
BW_NUMBER_PROVIDER: ${{ secrets.BW_NUMBER_PROVIDER }}
71+
72+
steps:
73+
- name: Set Release Version
74+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
75+
76+
- name: Check Release Tag Format
77+
run: |
78+
re=[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+(?:\.[0-9]){0,2}
79+
if ! [[ $RELEASE_VERSION =~ $re ]]; then
80+
echo 'Tag does not match expected regex pattern for beta releases (v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+(?:\.[0-9]){0,2})'
81+
echo $RELEASE_VERSION
82+
echo 'Please update your tag to match the expected regex pattern'
83+
exit 1
84+
fi
85+
86+
- name: Checkout
87+
uses: actions/checkout@v3
88+
with:
89+
ref: feature/openapi-generator-sdk
90+
91+
- name: Setup Ruby
92+
uses: ruby/setup-ruby@v1
93+
with:
94+
ruby-version: "3.0"
95+
96+
- name: Install Packages
97+
run: bundle install
98+
99+
- name: Test
100+
run: rake
101+
102+
- name: Deploy to Rubygems
103+
uses: ./.github/actions/deploy
104+
env:
105+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
106+
41107
- uses: Bandwidth/[email protected]
42108
if: always()
43109
with:

.github/workflows/test.yml

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
test:
15-
name: Test
14+
test_production:
15+
name: Test Production
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
@@ -57,3 +57,53 @@ jobs:
5757
job-status: ${{ job.status }}
5858
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
5959
slack-channel: ${{ secrets.SLACK_CHANNEL }}
60+
61+
test_feature:
62+
name: Test Feature Branch
63+
needs: test_production
64+
runs-on: ${{ matrix.os }}
65+
strategy:
66+
matrix:
67+
os: [windows-2022, windows-2019, ubuntu-20.04, ubuntu-22.04]
68+
ruby-version: [2.7, 3.0, 3.1, 3.2]
69+
steps:
70+
- name: Checkout
71+
uses: actions/checkout@v3
72+
with:
73+
ref: 'feature/openapi-generator-sdk'
74+
75+
- name: Set up Ruby
76+
uses: ruby/setup-ruby@v1
77+
with:
78+
ruby-version: ${{ matrix.ruby-version }}
79+
80+
- name: Install Packages
81+
run: bundle install
82+
83+
- name: Test
84+
env:
85+
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
86+
BW_USERNAME: ${{ secrets.BW_USERNAME }}
87+
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
88+
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
89+
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
90+
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
91+
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
92+
BW_NUMBER: ${{ secrets.BW_NUMBER }}
93+
USER_NUMBER: ${{ secrets.USER_NUMBER }}
94+
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
95+
RUBY_VERSION: ${{ matrix.ruby-version }}
96+
OPERATING_SYSTEM: ${{ matrix.os }}
97+
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
98+
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
99+
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
100+
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
101+
run: rake
102+
103+
- name: Notify Slack of Failures
104+
uses: Bandwidth/[email protected]
105+
if: failure() && !github.event.pull_request.draft
106+
with:
107+
job-status: ${{ job.status }}
108+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
109+
slack-channel: ${{ secrets.SLACK_CHANNEL }}

0 commit comments

Comments
 (0)