Skip to content

Commit

Permalink
Smoke test for built gem
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinj committed Nov 12, 2022
1 parent d34d808 commit 2c6fa02
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,20 @@ jobs:
- uses: paambaati/codeclimate-action@v3.2.0
with:
coverageLocations: "coverage-*/coverage.json:simplecov"

smoke:
name: Built GEM smoke test
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
- name: Build GEM
run: gem build
- name: Install built GEM
run: gem install jwt-*.gem
- name: Run test
run: bin/smoke.rb
9 changes: 9 additions & 0 deletions bin/smoke.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'jwt'

puts "Running simple encode/decode test for #{::JWT.gem_version}"
secret = 'secretkeyforsigning'
token = ::JWT.encode({ con: 'tent' }, secret, 'HS256')
::JWT.decode(token, secret, true, algorithm: 'HS256')
1 change: 0 additions & 1 deletion ruby-jwt.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'appraisal'
spec.add_development_dependency 'bundler'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'reek'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'simplecov'
end

0 comments on commit 2c6fa02

Please sign in to comment.