diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 145a02a77..e3d2c1574 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -406,6 +406,36 @@ jobs: python -m pip install 'openai==2.34.0' python -m pytest tests/test_provider_tools.py tests/test_atlas_provider.py tests/test_astraflow_provider.py tests/test_resolver.py + rails-security-fixture: + name: Rails Security Skill Fixture + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Setup Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '22.x' + + # tests/skills/rails-security.test.js asserts its document claims without Ruby and + # skips only the Active Storage cases, so this lane is what executes them. + - name: Setup Ruby + uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0 + with: + ruby-version: '3.3' + bundler-cache: true + working-directory: tests/fixtures/rails-security + + - name: Run the Rails security skill test + run: node tests/skills/rails-security.test.js + env: + ECC_RAILS_FIXTURE_REQUIRED: '1' + security: name: Security Scan runs-on: ubuntu-latest diff --git a/tests/skills/rails-security.test.js b/tests/skills/rails-security.test.js index 8c3c9554c..65f8a4318 100644 --- a/tests/skills/rails-security.test.js +++ b/tests/skills/rails-security.test.js @@ -117,7 +117,14 @@ function runFixture() { const cases = runFixture(); if (cases === null) { - skip('Active Storage lifecycle cases', 'ruby with rails and activestorage not available'); + // The CI lane sets this so a missing toolchain fails rather than passing silently. + if (process.env.ECC_RAILS_FIXTURE_REQUIRED === '1') { + failed += 1; + console.log(' ✗ Active Storage lifecycle cases'); + console.log(' ECC_RAILS_FIXTURE_REQUIRED=1 but ruby with rails could not run the fixture'); + } else { + skip('Active Storage lifecycle cases', 'ruby with rails and activestorage not available'); + } } else { const byName = new Map(cases.map(entry => [entry.case, entry])); const expectCase = name => {