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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 17 additions & 5 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: ["2.7"]
ruby: ["3.2", "3.3"]
runs-on: ${{ matrix.os }}
permissions:
contents: write
packages: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set env
run: |
echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
Expand All @@ -32,21 +32,33 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Retrieve bearer token
id: get_bearer_token
- name: Retrieve bearer token for EInvoicing
id: get_bearer_token_einvoicing
run: |
response=$(curl -X POST ${{secrets.OKTA_ACCESS_TOKEN_URL}}/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${{secrets.OKTA_CLIENT_ID}}&client_secret=${{secrets.OKTA_CLIENT_SECRET}}")
token=$(echo $response | jq -r '.access_token')
echo "BEARER_TOKEN=${token}" >> $GITHUB_ENV
echo "BEARER_TOKEN_EINVOICING=${token}" >> $GITHUB_ENV

- name: Retrieve bearer token for A1099
id: get_bearer_token_a1099
run: |
response=$(curl -X POST ${{secrets.AI_SBX_URL}}/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${{secrets.AI_CLIENT_ID_A1099}}&client_secret=${{secrets.AI_CLIENT_SECRET_A1099}}")
token=$(echo $response | jq -r '.access_token')
echo "BEARER_TOKEN_A1099=${token}" >> $GITHUB_ENV

- name: Run Integration Tests
run: |
gem install bundler:2.3.6
bundle config set --local path 'vendor/bundle'
bundle install
bundle exec rspec
env:
BEARER_TOKEN_EINVOICING: ${{ env.BEARER_TOKEN_EINVOICING }}
BEARER_TOKEN_A1099: ${{ env.BEARER_TOKEN_A1099 }}

- name: Update Ruby SDK version
run: |
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,38 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: ["2.7"]
ruby: ["3.2", "3.3"]

runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Ruby Versions
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Retrieve bearer token
id: get_bearer_token
- name: Retrieve bearer token for EInvoicing
id: get_bearer_token_einvoicing
run: |
response=$(curl -X POST ${{secrets.OKTA_ACCESS_TOKEN_URL}}/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${{secrets.OKTA_CLIENT_ID}}&client_secret=${{secrets.OKTA_CLIENT_SECRET}}")
token=$(echo $response | jq -r '.access_token')
echo "BEARER_TOKEN=${token}" >> $GITHUB_ENV
echo "BEARER_TOKEN_EINVOICING=${token}" >> $GITHUB_ENV

- name: Retrieve bearer token for A1099
id: get_bearer_token_a1099
run: |
response=$(curl -X POST ${{secrets.AI_SBX_URL}}/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${{secrets.AI_CLIENT_ID_A1099}}&client_secret=${{secrets.AI_CLIENT_SECRET_A1099}}")
token=$(echo $response | jq -r '.access_token')
echo "BEARER_TOKEN_A1099=${token}" >> $GITHUB_ENV

- name: Build & test
run: |
Expand All @@ -43,4 +53,5 @@ jobs:
bundle install
bundle exec rspec
env:
BEARER_TOKEN: ${{ env.BEARER_TOKEN }}
BEARER_TOKEN_EINVOICING: ${{ env.BEARER_TOKEN_EINVOICING }}
BEARER_TOKEN_A1099: ${{ env.BEARER_TOKEN_A1099 }}
4 changes: 3 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
--color
--require bundler/setup
--require spec_helper
--format documentation
--color
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ gemspec
group :development, :test do
gem 'rake', '~> 13.0.1'
gem 'pry-byebug'
gem 'rubocop', '~> 0.66.0'
gem 'rubocop', '~> 1.50'
gem 'ruby-debug-ide'
gem 'debase', '~> 0.2.5.beta2'
gem 'debug'
gem 'dotenv'
end
73 changes: 52 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
PATH
remote: .
specs:
avalara_sdk (24.12.2)
avalara_sdk (25.6.0)
faraday (~> 1.0, >= 1.0.1)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
ast (2.4.3)
byebug (11.1.3)
coderay (1.1.3)
debase (0.2.5.beta2)
debase-ruby_core_source (>= 0.10.12)
debase-ruby_core_source (0.10.16)
date (3.4.1)
debug (1.10.0)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.5.0)
dotenv (2.7.6)
erb (5.0.1)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand All @@ -28,32 +30,52 @@ GEM
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-em_synchrony (1.0.1)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.1.0)
faraday-multipart (1.1.1)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
jaro_winkler (1.5.4)
io-console (0.8.0)
irb (1.15.2)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.12.2)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
method_source (1.0.0)
multipart-post (2.4.1)
parallel (1.22.1)
parser (3.1.2.0)
parallel (1.27.0)
parser (3.3.8.0)
ast (~> 2.4.1)
racc
pp (0.6.2)
prettyprint
prettyprint (0.2.0)
prism (1.4.0)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
psych (4.0.4)
psych (5.2.6)
date
stringio
racc (1.8.1)
rainbow (3.1.1)
rake (13.0.6)
rdoc (6.14.0)
erb
psych (>= 4.0.0)
regexp_parser (2.10.0)
reline (0.6.1)
io-console (~> 0.5)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
Expand All @@ -67,35 +89,44 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
rubocop (0.66.0)
jaro_winkler (~> 1.5.1)
rubocop (1.76.1)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
psych (>= 3.1.0)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.45.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.6)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.45.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
ruby-debug-ide (0.7.3)
rake (>= 0.8.1)
ruby-progressbar (1.11.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
stringio (3.0.2)
unicode-display_width (1.5.0)
stringio (3.1.7)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)

PLATFORMS
arm64-darwin-22
arm64-darwin-24
x64-mingw32
x86_64-darwin-20
x86_64-linux

DEPENDENCIES
avalara_sdk!
debase (~> 0.2.5.beta2)
debug
dotenv
pry-byebug
rake (~> 13.0.1)
rspec (~> 3.6, >= 3.6.0)
rubocop (~> 0.66.0)
rubocop (~> 1.50)
ruby-debug-ide

BUNDLED WITH
Expand Down
Loading