Skip to content

Commit b8f1fd1

Browse files
committed
Updates verify workflow to use shared pipeline
1 parent 64ab72b commit b8f1fd1

File tree

2 files changed

+18
-61
lines changed

2 files changed

+18
-61
lines changed

.github/workflows/verify.yml

Lines changed: 10 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -25,64 +25,13 @@ 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-
- '3.1'
50-
- '3.2'
51-
- '3.3'
52-
os:
53-
- ubuntu-22.04
54-
- ubuntu-24.04
55-
56-
env:
57-
RAILS_ENV: test
58-
59-
name: ${{ matrix.os }} - Ruby ${{ matrix.ruby }}
60-
steps:
61-
- name: Install system dependencies
62-
run: sudo apt-get install graphviz
63-
64-
- name: Checkout code
65-
uses: actions/checkout@v2
66-
67-
- name: Setup Ruby
68-
uses: ruby/setup-ruby@v1
69-
with:
70-
ruby-version: ${{ matrix.ruby }}
71-
bundler-cache: true
72-
73-
- name: Test
74-
run: |
75-
cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
76-
bundle exec rake --version
77-
bundle exec rake db:test:prepare
78-
79-
bundle exec rake spec
80-
bundle exec rake yard
81-
82-
- name: Upload coverage report
83-
uses: actions/upload-artifact@v4
84-
with:
85-
name: coverage-${{ matrix.os }}-${{ matrix.ruby }}
86-
path: |
87-
coverage/
88-
retention-days: 1
28+
build:
29+
uses: rapid7/metasploit-framework/.github/workflows/shared_gem_verify_rails.yml@master
30+
with:
31+
dependencies: '["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:test:prepare
36+
bundle exec rake spec
37+
bundle exec rake yard

metasploit-model.gemspec

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,12 @@ Gem::Specification.new do |spec|
4343

4444
spec.platform = Gem::Platform::RUBY
4545
end
46+
47+
# bigdecimal and mutex_m are not part of the default gems starting from Ruby 3.4.0: https://www.ruby-lang.org/en/news/2023/12/25/ruby-3-3-0-released/
48+
%w[
49+
bigdecimal
50+
mutex_m
51+
].each do |library|
52+
spec.add_runtime_dependency library
53+
end
4654
end

0 commit comments

Comments
 (0)