This repository was archived by the owner on Jun 18, 2026. It is now read-only.
perf(incidentReplay): cache lowercased evidence text in causal/patter… #687
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v3 | |
| - name: Setup NuGet | |
| uses: NuGet/setup-nuget@v4 | |
| - name: Restore NuGet packages | |
| run: nuget restore BioBotsTool.sln | |
| - name: Build solution | |
| run: msbuild BioBotsTool.sln /p:Configuration=Release /p:Platform="Any CPU" /m /verbosity:minimal | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests with coverage | |
| run: npx jest --verbose --coverage --coverageReporters=text --coverageReporters=lcov --coverageReporters=json-summary | |
| - name: Enforce coverage thresholds | |
| run: | | |
| node -e " | |
| const s = require('./coverage/coverage-summary.json').total; | |
| const thresholds = { lines: 70, branches: 60, functions: 70, statements: 70 }; | |
| let fail = false; | |
| for (const [metric, min] of Object.entries(thresholds)) { | |
| const pct = s[metric].pct; | |
| if (pct < min) { | |
| console.error('❌ ' + metric + ': ' + pct + '% < ' + min + '% threshold'); | |
| fail = true; | |
| } else { | |
| console.log('✅ ' + metric + ': ' + pct + '% >= ' + min + '%'); | |
| } | |
| } | |
| if (fail) process.exit(1); | |
| " | |
| - name: Coverage summary | |
| if: always() | |
| run: | | |
| if [ -f coverage/coverage-summary.json ]; then | |
| echo "## 📊 Test Coverage" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| node -e " | |
| const s = require('./coverage/coverage-summary.json').total; | |
| console.log('| Metric | Coverage |'); | |
| console.log('|--------|----------|'); | |
| console.log('| Lines | ' + s.lines.pct + '% |'); | |
| console.log('| Branches | ' + s.branches.pct + '% |'); | |
| console.log('| Functions | ' + s.functions.pct + '% |'); | |
| " >> $GITHUB_STEP_SUMMARY | |
| fi | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Validate JSON data file | |
| run: python3 -c "import json; json.load(open('bioprint-data.json'))" && echo "✅ bioprint-data.json is valid JSON" | |
| - name: Check for trailing whitespace | |
| run: | | |
| if grep -rn '\s$' Try/*.cs Try/**/*.cs 2>/dev/null; then | |
| echo "⚠️ Trailing whitespace found in C# files" | |
| else | |
| echo "✅ No trailing whitespace in C# files" | |
| fi | |
| - name: Validate workflow files | |
| run: | | |
| for f in .github/workflows/*.yml; do | |
| python3 -c "import yaml; yaml.safe_load(open('$f'))" && echo "✅ $f is valid YAML" | |
| done |