Skip to content

feat: flag packages their maintainer has declared deprecated (SA010) #353

feat: flag packages their maintainer has declared deprecated (SA010)

feat: flag packages their maintainer has declared deprecated (SA010) #353

Workflow file for this run

name: RSpec tests
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 1 * *'
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
ruby: ['3.3', '3.4', '4.0', head]
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.ruby == 'head' }}
steps:
- uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Execute the tests
run: bundle exec rspec
env:
# Measure coverage and enforce the floor on one version only, so the
# branch-coverage floor can't flake on cross-version differences.
COVERAGE: ${{ matrix.ruby == '3.4' && '1' || '' }}
floors:
name: Dependency floors (min versions)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# Resolve the minimum supported Ruby from the gemspec so this can't drift
# from required_ruby_version (uses the runner's system Ruby).
- name: Resolve minimum Ruby from gemspec
id: ruby
run: |
version=$(ruby -e 'lower = Gem::Specification.load("still_active.gemspec").required_ruby_version.requirements.select { |op, _| op == ">=" }.map(&:last).min; puts lower.segments.first(2).join(".")')
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Set up minimum supported Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ steps.ruby.outputs.version }}
# Gemfile.floors pins every runtime dep with a declared floor to that floor.
# Red here means a floor in still_active.gemspec is too low and needs bumping.
- name: Install declared floor versions
run: BUNDLE_GEMFILE=Gemfile.floors bundle install
- name: Run the suite against the floors
run: BUNDLE_GEMFILE=Gemfile.floors bundle exec rspec
optional-cvss:
name: Optional cvss-suite integration (real scoring)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
# cvss-suite is an optional runtime dependency, deliberately out of the default
# bundle (see lib/still_active/helpers/cvss_helper.rb). Gemfile.cvss adds the LATEST release
# back so the real-vector golden specs run against the actual gem -- red here
# means a new cvss-suite drifted the API or the math we depend on.
- name: Install with cvss-suite
run: BUNDLE_GEMFILE=Gemfile.cvss bundle install
- name: Run the real-scoring specs
run: BUNDLE_GEMFILE=Gemfile.cvss bundle exec rspec --tag real_cvss