Skip to content

Commit dab593f

Browse files
committed
Show the built version
1 parent 7f12b05 commit dab593f

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,21 @@ jobs:
3838
ruby-version: ${{ matrix.ruby }}
3939
rubygems: ${{ matrix.ruby < '2.7' && '3.4.22' || '' }}
4040
bundler-cache: true
41+
- id: platform
42+
run: |
43+
#!ruby
44+
lib = File.expand_path("lib/#{RUBY_VERSION}/#{Gem::Platform.local}")
45+
libs = [ENV["RUBYLIB"], lib].compact.join(File::PATH_SEPARATOR)
46+
File.write(ENV["GITHUB_ENV"], "RUBYLIB=#{libs}\n", mode: "a")
47+
shell: ruby {0}
48+
- name: Version
49+
run: |
50+
ruby -v -retc -e "puts Etc::VERSION if Etc.const_defined?('VERSION')"
51+
- name: Compile
52+
run: rake compile
4153
- name: Run test
42-
run: bundle exec rake compile test
54+
run: |
55+
ruby -Itest/lib -rhelper -e Test::Unit::AutoRunner.run test/etc/test_*.rb
4356
- id: fetch
4457
run: |
4558
: Fetch deeper for changelogs
@@ -50,6 +63,9 @@ jobs:
5063
set +x
5164
shell: bash
5265
if: ${{ matrix.ruby == needs.ruby-versions.outputs.latest }}
66+
- name: Built Version
67+
run: |
68+
ruby -v -retc -e "puts Etc::VERSION if Etc.const_defined?('VERSION')"
5369
- id: build
5470
run: |
5571
bundle exec rake build

0 commit comments

Comments
 (0)