-
Notifications
You must be signed in to change notification settings - Fork 0
ci: cover the web e2e write path and seed the cargo caches from main #1246
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
09ea5ce
ci: cover the web e2e write path and seed the cargo caches from main
FSM1 a1ae895
test: prove the write path byte for byte, not through the decoder
FSM1 ea16906
test: dismiss the preview before the listing is used again
FSM1 1724262
test: drive the round-trip save from the preview dialog
claude 4eb048b
test: assert the upload round trip on engine bytes, not saved bytes
claude 1b5e40a
test: pin the introspection node id decode against bad hex
claude 5dfc335
fix(engine): deny the read-accelerator bearer to a plain-http gateway
FSM1 1e898b4
refactor(engine): make the accelerator credential rule structural
FSM1 94a9bd0
fix: address PR review comments
FSM1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # `ci.yml` runs on `pull_request` only, and GitHub scopes a cache entry to the | ||
| # ref that wrote it — a PR writes under `refs/pull/N/merge`, invisible to every | ||
| # other PR, so each PR's first cargo run is cold. A run can also read entries | ||
| # scoped to the default branch, which is what this workflow writes. | ||
| # | ||
| # Two entries, not one per cargo job: the per-job keys stay each PR's own save | ||
| # key and gain a trailing `main-cargo-` / `main-wasm-cargo-` restore-key that | ||
| # reaches these. The keys hash `Cargo.lock` and the toolchain — the two inputs | ||
| # that invalidate a dependency tree — so a merge that changes neither hits its | ||
| # own key and writes nothing. The repo's cache budget is already tight, and | ||
| # these entries have to earn their bytes against the PR-scoped ones LRU evicts. | ||
| name: Cargo Cache Seed | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'Cargo.lock' | ||
| - 'rust-toolchain.toml' | ||
| - '.github/workflows/cargo-cache-seed.yml' | ||
| # An entry LRU evicted between lockfile changes has no push to recreate it. | ||
| schedule: | ||
| - cron: '0 5 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| concurrency: | ||
| group: cargo-cache-seed | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| # Serves every job keyed `linux-cargo-`, `core-kats-cargo-` and | ||
| # `client-browser-cargo-`: one host `target` tree and one registry. | ||
| native: | ||
| name: Seed the native Linux cargo cache | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| target | ||
| key: main-cargo-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | ||
| restore-keys: main-cargo- | ||
|
|
||
| # Compiled, not run: what a PR restores this for is the dependency tree. | ||
| # The desktop shell stays out — Tauri needs webkit2gtk system deps, and | ||
| # its own jobs cache under their own keys. | ||
| - name: Build the test targets the PR cargo jobs compile | ||
| run: cargo test --workspace --exclude cipherbox-desktop --no-run | ||
|
|
||
| # Serves the `wasm-engine-cargo-` and `web-e2e-cargo-` jobs, whose path set is | ||
| # the host build tree plus the browser target rather than the whole of `target`. | ||
| wasm: | ||
| name: Seed the wasm cargo cache | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| target/release | ||
| target/wasm32-unknown-unknown | ||
| key: main-wasm-cargo-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | ||
| restore-keys: main-wasm-cargo- | ||
|
|
||
| - uses: ./.github/actions/wasm-bindgen-cli | ||
|
|
||
| - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | ||
|
|
||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version-file: 'package.json' | ||
|
|
||
| - name: Build the engine WASM | ||
| run: pnpm --filter @cipherbox/web run build:wasm |
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.