Skip to content

Commit eed8b0e

Browse files
committed
Updates verify workflow to use shared pipeline
1 parent 190edd3 commit eed8b0e

File tree

2 files changed

+20
-68
lines changed

2 files changed

+20
-68
lines changed

.github/workflows/verify.yml

Lines changed: 11 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -25,71 +25,14 @@ on:
2525
- '*'
2626

2727
jobs:
28-
test:
29-
runs-on: ${{ matrix.os }}
30-
timeout-minutes: 40
31-
32-
services:
33-
postgres:
34-
image: postgres:9.6
35-
ports: ["5432:5432"]
36-
env:
37-
POSTGRES_USER: postgres
38-
POSTGRES_PASSWORD: postgres
39-
options: >-
40-
--health-cmd pg_isready
41-
--health-interval 10s
42-
--health-timeout 5s
43-
--health-retries 5
44-
45-
strategy:
46-
fail-fast: true
47-
matrix:
48-
ruby:
49-
- '2.7'
50-
- '3.0'
51-
- '3.1'
52-
- '3.2'
53-
rails:
54-
- '~> 7.0.0'
55-
- '~> 7.1.0'
56-
os:
57-
- ubuntu-22.04
58-
- ubuntu-latest
59-
exclude:
60-
- { os: ubuntu-latest, ruby: '2.7' }
61-
- { os: ubuntu-latest, ruby: '3.0' }
62-
63-
env:
64-
RAILS_ENV: test
65-
66-
name: ${{ matrix.os }} - Ruby ${{ matrix.ruby }} - Rails ${{ matrix.rails }}
67-
steps:
68-
- name: Install system dependencies
69-
run: sudo apt-get install libpcap-dev graphviz
70-
71-
- name: Checkout code
72-
uses: actions/checkout@v4
73-
74-
- name: Setup Ruby
75-
uses: ruby/setup-ruby@v1
76-
with:
77-
ruby-version: ${{ matrix.ruby }}
78-
bundler-cache: true
79-
80-
- name: Update Rails version
81-
run: |
82-
ruby -pi.bak -e "gsub(/gem ['\"]rails['\"],\s*['\"].+['\"]?/, \"gem 'rails', '${{ matrix.rails }}'\")" Gemfile
83-
bundle update
84-
bundle install
85-
86-
- name: Test
87-
run: |
88-
cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
89-
bundle exec rake --version
90-
bundle exec rake db:create db:migrate
91-
92-
# Disabling this check because it is proving unreliable
93-
# git diff --exit-code spec/dummy/db/structure.sql
94-
bundle exec rake spec
95-
bundle exec rake yard
28+
build:
29+
uses: rapid7/metasploit-framework/.github/workflows/shared_gem_verify_rails.yml@master
30+
with:
31+
dependencies: '["libpcap-dev", "graphviz"]'
32+
test_commands: |
33+
cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
34+
bundle exec rake --version
35+
bundle exec rake db:create db:migrate
36+
bundle exec rake spec
37+
bundle exec rake spec
38+
bundle exec rake yard

metasploit_data_models.gemspec

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ Gem::Specification.new do |s|
4646
# arel-helpers: Useful tools to help construct database queries with ActiveRecord and Arel.
4747
s.add_runtime_dependency 'arel-helpers'
4848

49+
# Standard libraries: https://www.ruby-lang.org/en/news/2023/12/25/ruby-3-3-0-released/
50+
%w[
51+
bigdecimal
52+
drb
53+
mutex_m
54+
].each do |library|
55+
s.add_runtime_dependency library
56+
end
57+
4958
if RUBY_PLATFORM =~ /java/
5059
# markdown formatting for yard
5160
s.add_development_dependency 'kramdown'

0 commit comments

Comments
 (0)