Skip to content

Commit 0fb7bfb

Browse files
feat: Implement DPOP authentication and authorization across turbomcp components, enhancing security and client-server interactions.
1 parent 07b7230 commit 0fb7bfb

File tree

159 files changed

+7868
-4294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+7868
-4294
lines changed

.github/workflows/performance.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
# DISABLED - Performance Benchmarks & Regression Detection
2-
name: Performance Benchmarks & Regression Detection (DISABLED)
1+
# Performance Benchmarks & Regression Detection
2+
# Re-enabled for enterprise production readiness
3+
name: Performance Benchmarks
34

45
on:
5-
# push:
6-
# branches: [ main, develop ]
7-
# pull_request:
8-
# branches: [ main ]
9-
# schedule:
10-
# # Run performance benchmarks daily at 2 AM UTC
11-
# - cron: '0 2 * * *'
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
schedule:
11+
# Run performance benchmarks weekly on Sundays at 2 AM UTC (reduced from daily)
12+
- cron: '0 2 * * 0'
1213
workflow_dispatch:
1314
inputs:
1415
update_baselines:

.github/workflows/test.yml

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,72 @@ jobs:
146146
fi
147147
148148
- name: Run unit tests
149-
run: cargo test -p turbomcp-wasm --lib
149+
run: cargo test -p turbomcp-wasm --lib
150+
151+
coverage:
152+
name: Code Coverage
153+
runs-on: ubuntu-latest
154+
# Run coverage on main branch pushes only to save CI resources
155+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
156+
157+
steps:
158+
- uses: actions/checkout@v4
159+
160+
- name: Free up disk space
161+
run: |
162+
sudo rm -rf /usr/share/dotnet /opt/ghc /opt/hostedtoolcache
163+
sudo rm -rf /usr/local/lib/android /usr/local/share/powershell
164+
sudo apt-get clean
165+
166+
- name: Install Rust toolchain
167+
uses: dtolnay/rust-toolchain@stable
168+
with:
169+
components: llvm-tools-preview
170+
171+
- name: Install cargo-llvm-cov
172+
uses: taiki-e/install-action@cargo-llvm-cov
173+
174+
- name: Cache cargo dependencies
175+
uses: actions/cache@v4
176+
with:
177+
path: |
178+
~/.cargo/bin/
179+
~/.cargo/registry/index/
180+
~/.cargo/registry/cache/
181+
~/.cargo/git/db/
182+
key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
183+
restore-keys: ${{ runner.os }}-cargo-coverage-
184+
185+
- name: Generate coverage report
186+
env:
187+
CARGO_TARGET_DIR: /tmp/cargo-coverage
188+
run: |
189+
cargo llvm-cov --workspace --lib --lcov --output-path lcov.info \
190+
--ignore-filename-regex '(tests?/|benches/|examples/)'
191+
192+
# Extract coverage percentage
193+
COVERAGE=$(cargo llvm-cov report --workspace --lib 2>/dev/null | grep -E 'TOTAL' | awk '{print $NF}' | tr -d '%')
194+
echo "Coverage: ${COVERAGE}%"
195+
echo "COVERAGE_PERCENT=${COVERAGE}" >> $GITHUB_ENV
196+
197+
# Fail if coverage is below minimum threshold (70%)
198+
MIN_COVERAGE=70
199+
if [ "$(echo "$COVERAGE < $MIN_COVERAGE" | bc -l)" -eq 1 ]; then
200+
echo "::error::Coverage ${COVERAGE}% is below minimum threshold of ${MIN_COVERAGE}%"
201+
exit 1
202+
fi
203+
204+
# Warn if coverage is below target (80%)
205+
TARGET_COVERAGE=80
206+
if [ "$(echo "$COVERAGE < $TARGET_COVERAGE" | bc -l)" -eq 1 ]; then
207+
echo "::warning::Coverage ${COVERAGE}% is below target of ${TARGET_COVERAGE}%"
208+
fi
209+
210+
- name: Upload coverage to Codecov
211+
uses: codecov/codecov-action@v4
212+
with:
213+
files: lcov.info
214+
fail_ci_if_error: false
215+
verbose: true
216+
env:
217+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)