-
Notifications
You must be signed in to change notification settings - Fork 8
Add trusted-server-adapter-axum native dev server (PR 16) #643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/edgezero-pr15-remove-fastly-core
Are you sure you want to change the base?
Changes from all commits
8ac395a
8f0be1b
0e81b2a
3a0bcad
450a459
3e3016b
ec2f5f5
93ec543
a5a7719
ba6ca2e
a783330
e2b1a61
8b54aca
e967133
6059de2
75fe0d0
6b6c221
0a15d1d
a780034
0dcc750
d3138fd
6d1184d
9a0d38c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,19 @@ | ||
| [alias] | ||
| test_details = ["test", "--target", "aarch64-apple-darwin"] | ||
| # No global [build] target — the workspace contains adapters for multiple targets: | ||
| # trusted-server-adapter-fastly → wasm32-wasip1 (Fastly Compute) | ||
| # trusted-server-adapter-axum → native (dev server) | ||
| # Future: trusted-server-adapter-cloudflare → wasm32-unknown-unknown | ||
| # | ||
| # Both adapters are workspace members so `-p` resolves both. | ||
| # default-members = [fastly] — required so Viceroy can locate the binary via `cargo run --bin`. | ||
| # Use the aliases below to target each adapter with the correct toolchain. | ||
|
|
||
| [build] | ||
| target = "wasm32-wasip1" | ||
| [alias] | ||
| # Fastly adapter + shared crates (wasm32-wasip1 via Viceroy) | ||
| test-fastly = ["test", "--workspace", "--exclude", "trusted-server-adapter-axum", "--target", "wasm32-wasip1"] | ||
| # Axum dev server adapter (native) | ||
| test-axum = ["test", "-p", "trusted-server-adapter-axum"] | ||
| # CI convenience — runs both in sequence (shell aliases can't chain; use a script or CI steps) | ||
| # cargo test-fastly && cargo test-axum | ||
|
|
||
| [target.'cfg(all(target_arch = "wasm32"))'] | ||
| runner = "viceroy run -C ../../fastly.toml -- " |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,30 +21,58 @@ jobs: | |
| run: echo "rust-version=$(grep '^rust ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT | ||
| shell: bash | ||
|
|
||
| - name: Retrieve Viceroy version | ||
| id: viceroy-version | ||
| # `.tool-versions` is the single source of truth so this workflow and | ||
| # `.github/actions/setup-integration-test-env/action.yml` can't drift. | ||
| # The pin matters because upstream Viceroy > v0.16.4 has bumped MSRV | ||
| # beyond the rustc pin in `rust-toolchain.toml`. | ||
| run: echo "viceroy-version=$(grep '^viceroy ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT | ||
| shell: bash | ||
|
|
||
| - name: Set up Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| toolchain: ${{ steps.rust-version.outputs.rust-version }} | ||
| target: wasm32-wasip1 | ||
| cache-shared-key: cargo-${{ runner.os }} | ||
|
|
||
| - name: Get Viceroy cache key | ||
| id: viceroy-rev | ||
| run: echo "sha=$(git ls-remote https://github.com/fastly/Viceroy HEAD | cut -f1)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache Viceroy binary | ||
| id: cache-viceroy | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/bin/viceroy | ||
| key: viceroy-${{ runner.os }}-${{ steps.viceroy-rev.outputs.sha }} | ||
| key: viceroy-${{ runner.os }}-v${{ steps.viceroy-version.outputs.viceroy-version }} | ||
|
|
||
| - name: Install Viceroy (from main since 0.14.3 is broken) | ||
| - name: Install Viceroy | ||
| if: steps.cache-viceroy.outputs.cache-hit != 'true' | ||
| run: cargo install --git https://github.com/fastly/Viceroy viceroy | ||
| run: cargo install --git https://github.com/fastly/Viceroy --tag v${{ steps.viceroy-version.outputs.viceroy-version }} viceroy | ||
|
|
||
| - name: Run tests | ||
| run: cargo test --workspace | ||
| run: cargo test-fastly | ||
|
|
||
| test-axum: | ||
| name: cargo test (axum native) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Retrieve Rust version | ||
| id: rust-version | ||
| run: echo "rust-version=$(grep '^rust ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT | ||
| shell: bash | ||
|
|
||
| - name: Set up Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| toolchain: ${{ steps.rust-version.outputs.rust-version }} | ||
| cache-shared-key: cargo-${{ runner.os }} | ||
|
|
||
| - name: Build Axum adapter | ||
| run: cargo build -p trusted-server-adapter-axum | ||
|
|
||
| - name: Run Axum adapter tests | ||
| run: cargo test-axum | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 note — Pre-existing finding (aram356, deferred to follow-up): this The 8 tests in Not blocking — but please document this in |
||
|
|
||
| test-typescript: | ||
| name: vitest | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| fastly 13.3.0 | ||
| rust 1.91.1 | ||
| nodejs 24.12.0 | ||
| viceroy 0.16.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 wrench — Same
synthetic→edge_cookierename miss asscripts/integration-tests.sh:63. The Fastly build above (line 87) uses the correct name; this Axum build does not.Fix:
Without this, the CI Axum binary in
Integration Testsruns with the placeholder secret and the EdgeCookie/HMAC path is effectively unverified for the Axum runtime.