From 163e07712b1837f8becf8d4d2e111907166b199b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 10 Dec 2024 18:22:51 +0900 Subject: [PATCH] Test installation from packages --- .github/workflows/test.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 946b6c3..462c5b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,3 +32,19 @@ jobs: bundler-cache: true - name: Run test run: bundle exec rake test + - name: Build package + id: build + shell: bash + run: | + if ruby -e 'exit RUBY_VERSION>="3.0."'; then + bundle exec rake build + set pkg/*.gem + echo pkg=$1 >> $GITHUB_OUTPUT + fi + - name: Install gem + run: | + gem install ${{ steps.build.outputs.pkg }} + ruby -rresolv -e 'puts $LOADED_FEATURES.grep(/resolv/)' + ruby -rresolv -e 'puts Resolv::VERSION' + if: ${{ steps.build.outputs.pkg }} + continue-on-error: ${{ startsWith(matrix.ruby, 'jruby') }}