name: Verify

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
  actions: none
  checks: none
  contents: none
  deployments: none
  id-token: none
  issues: none
  discussions: none
  packages: none
  pages: none
  pull-requests: none
  repository-projects: none
  security-events: none
  statuses: none

on:
  push:
    branches:
      - '*'
  pull_request:
    branches:
      - '*'

jobs:
  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
