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
71 changes: 10 additions & 61 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,64 +25,13 @@ on:
- '*'

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 40

services:
postgres:
image: postgres:9.6
ports: [ "5432:5432" ]
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

strategy:
fail-fast: true
matrix:
ruby:
- '3.1'
- '3.2'
- '3.3'
os:
- ubuntu-22.04
- ubuntu-24.04

env:
RAILS_ENV: test

name: ${{ matrix.os }} - Ruby ${{ matrix.ruby }}
steps:
- name: Install system dependencies
run: sudo apt-get install graphviz

- name: Checkout code
uses: actions/checkout@v2

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Test
run: |
cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
bundle exec rake --version
bundle exec rake db:test:prepare

bundle exec rake spec
bundle exec rake yard

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os }}-${{ matrix.ruby }}
path: |
coverage/
retention-days: 1
build:
uses: rapid7/metasploit-framework/.github/workflows/shared_gem_verify_rails.yml@master
with:
dependencies: '["graphviz"]'
test_commands: |
cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
bundle exec rake --version
bundle exec rake db:test:prepare
bundle exec rake spec
bundle exec rake yard
9 changes: 9 additions & 0 deletions metasploit-model.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,13 @@ Gem::Specification.new do |spec|

spec.platform = Gem::Platform::RUBY
end

# Standard libraries: https://www.ruby-lang.org/en/news/2023/12/25/ruby-3-3-0-released/
%w[
bigdecimal
drb
mutex_m
].each do |library|
spec.add_runtime_dependency library
end
end
Loading