Skip to content

Commit

Permalink
CI: builds and installs gem and run simple smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
tisba committed May 14, 2024
1 parent 2c88956 commit ece2e3b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ jobs:
run: bundle exec rake compile
- name: Test
run: bundle exec rake test
- name: Build & Install gem
run: |
bundle exec rake build
gem uninstall --all --force mini_racer
gem install --local pkg/*.gem
- name: Smoke Test installed gem
run: ruby test/smoke/minimal.rb

test-darwin:
strategy:
Expand Down Expand Up @@ -68,6 +75,13 @@ jobs:
run: bundle exec rake compile
- name: Test
run: bundle exec rake test
- name: Build & Install gem
run: |
bundle exec rake build
gem uninstall --all --force mini_racer
gem install --local pkg/*.gem
- name: Smoke Test installed gem
run: ruby test/smoke/minimal.rb

test-linux:
strategy:
Expand Down Expand Up @@ -122,3 +136,10 @@ jobs:
run: docker exec -w "${PWD}" ${{ steps.container.outputs.container_id }} bundle exec rake compile
- name: Test
run: docker exec -w "${PWD}" ${{ steps.container.outputs.container_id }} bundle exec rake test
- name: Build & Install gem
run: |
docker exec -w "${PWD}" ${{ steps.container.outputs.container_id }} bundle exec rake build
docker exec -w "${PWD}" ${{ steps.container.outputs.container_id }} gem uninstall --all --force mini_racer
docker exec -w "${PWD}" ${{ steps.container.outputs.container_id }} gem install --local pkg/*.gem
- name: Smoke Test installed gem
run: docker exec -w "${PWD}" ${{ steps.container.outputs.container_id }} ruby test/smoke/minimal.rb
17 changes: 17 additions & 0 deletions test/smoke/minimal.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

require "mini_racer"
require "libv8-node"
require "rbconfig"

puts "RbConfig::CONFIG['LIBS']: #{RbConfig::CONFIG["LIBS"]}"
puts "RUBY_VERSION: #{RUBY_VERSION}"
puts "RUBY_PLATFORM: #{RUBY_PLATFORM}"
puts "MiniRacer::VERSION: #{MiniRacer::VERSION}"
puts "MiniRacer::LIBV8_NODE_VERSION: #{MiniRacer::LIBV8_NODE_VERSION}"
puts "Libv8::Node::VERSION: #{Libv8::Node::VERSION}"
puts "Libv8::Node::NODE_VERSION: #{Libv8::Node::NODE_VERSION}"
puts "Libv8::Node::LIBV8_VERSION: #{Libv8::Node::LIBV8_VERSION}"
puts "=" * 80

puts MiniRacer::Context.new.eval("41 + 1")

0 comments on commit ece2e3b

Please sign in to comment.