mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-17 13:32:18 +00:00
ci: run the Rails security skill fixture
- Without a lane that installs the fixture bundle, runFixture returns null on every runner and the Active Storage cases skip while CI stays green, leaving the published upload example unverified - Adds a single rails-security-fixture job following the python-tests pattern rather than adding Ruby to the test matrix, pinning ruby/setup-ruby by SHA and bundling from the fixture's own directory - ECC_RAILS_FIXTURE_REQUIRED=1 turns the skip into a failure in that lane only, so other environments keep the optional skip
This commit is contained in:
1 parent
92a2328e91
commit
de0c862fb8
2 files changed
+38
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
Reference in new issue
Block a user