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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_and_release_gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
with:
persist-credentials: false

- name: Set up Ruby 3.1.0 and bundle
- name: Set up Ruby 3.3 and bundle
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
ruby-version: '3.3'
bundler-cache: true

- name: Get gem version
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ on:
push:
branches-ignore:
- main
paths-ignore:
- 'test/Dockerfile'
- '.github/*'
- 'lambda/*'
paths:
- '**/*.rb'
- '**/*.gemspec'
- '**/Gemfile*'
- 'test/**'
- '.github/workflows/run_unit_tests.yml'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# run act to test locally: act -j unit_test --container-architecture linux/arm64 -s SW_APM_SERVICE_KEY=your_key
unit_test:
Expand Down
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@ task :build_and_publish_gem do
exit 1 if ENV['GEM_HOST_API_KEY'] && !system('gem', 'push', gem_file)
end

desc 'Build and publish to Rubygems (alias for GitHub Actions compatibility)'
task :release do
gemspec_file = 'solarwinds_apm.gemspec'
gemspec = Gem::Specification.load(gemspec_file)
gem_file = "#{gemspec.full_name}.gem"

exit 1 unless system('gem', 'build', gemspec_file)

exit 1 unless system('gem', 'push', gem_file)
Comment thread
xuan-cao-swi marked this conversation as resolved.
end
Comment thread Fixed
Comment thread
xuan-cao-swi marked this conversation as resolved.

desc 'Build gem locally for testing'
task :build_gem do
puts "\n=== building for MRI ===\n"
Expand Down