Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 43 additions & 2 deletions .github/workflows/integration-drizzle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ on:
- '.github/workflows/integration-drizzle.yml'
- '.github/actions/integration-setup/**'
- '.github/actions/integration-db/**'
- '.github/actions/build-ffi-binding/**'
# The Rust that produces every EQL payload these suites round-trip.
# Absorbing protect-ffi put it in-tree, so a crate change can now
# break them in a PR that touches no TypeScript at all.
#
# The manifests are here for the same reason as the sources: a
# dependency bump in Cargo.lock changes the compiled encryption core
# without touching a .rs file, and package.json / mise.toml carry the
# build scripts and the toolchain pin. Matching the filter in
# tests-rust.yml, which already covers all four.
- 'packages/protect-ffi/crates/**'
- 'packages/protect-ffi/src/**'
- 'packages/protect-ffi/Cargo.toml'
- 'packages/protect-ffi/Cargo.lock'
- 'packages/protect-ffi/package.json'
- 'packages/protect-ffi/mise.toml'
pull_request:
branches: ['**']
# Repeated verbatim: GitHub Actions does not support YAML anchors/aliases.
Expand Down Expand Up @@ -106,6 +122,22 @@ on:
- '.github/workflows/integration-drizzle.yml'
- '.github/actions/integration-setup/**'
- '.github/actions/integration-db/**'
- '.github/actions/build-ffi-binding/**'
# The Rust that produces every EQL payload these suites round-trip.
# Absorbing protect-ffi put it in-tree, so a crate change can now
# break them in a PR that touches no TypeScript at all.
#
# The manifests are here for the same reason as the sources: a
# dependency bump in Cargo.lock changes the compiled encryption core
# without touching a .rs file, and package.json / mise.toml carry the
# build scripts and the toolchain pin. Matching the filter in
# tests-rust.yml, which already covers all four.
- 'packages/protect-ffi/crates/**'
- 'packages/protect-ffi/src/**'
- 'packages/protect-ffi/Cargo.toml'
- 'packages/protect-ffi/Cargo.lock'
- 'packages/protect-ffi/package.json'
- 'packages/protect-ffi/mise.toml'

jobs:
integration:
Expand Down Expand Up @@ -181,8 +213,9 @@ jobs:
- uses: ./.github/actions/integration-setup

# Fast pre-flight: fail in seconds if a secret was rotated or cleared,
# before the docker pull. The in-test `requireIntegrationEnv` is the
# correctness guarantee; this is the cheap one.
# before the binding build and the docker pull. The in-test
# `requireIntegrationEnv` is the correctness guarantee; this is the cheap
# one, so nothing expensive may be ordered ahead of it.
- name: Require CipherStash secrets
uses: ./.github/actions/require-cs-secrets
with:
Expand All @@ -191,6 +224,14 @@ jobs:
client-key: ${{ secrets.CS_CLIENT_KEY }}
client-access-key: ${{ secrets.CS_CLIENT_ACCESS_KEY }}

# `wasm: true` because CS_IT_SUITE below includes `integration/wasm/**`
# — the `@cipherstash/stack/wasm-inline` adapter over the shared v3
# matrix — which loads the real WASM, unlike the mocked unit tests.
- name: Build the protect-ffi binding
uses: ./.github/actions/build-ffi-binding
with:
wasm: 'true'

# No pre-`up` cleanup step any more: the project name is unique per job, so
# a container leaked by a hard-killed prior run cannot hold this job's
# name or its (ephemeral) port. Blanket-pruning would now be actively
Expand Down
42 changes: 40 additions & 2 deletions .github/workflows/integration-prisma-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ on:
- '.github/workflows/integration-prisma-next.yml'
- '.github/actions/integration-setup/**'
- '.github/actions/integration-db/**'
- '.github/actions/build-ffi-binding/**'
# The Rust that produces every EQL payload these suites round-trip.
# Absorbing protect-ffi put it in-tree, so a crate change can now
# break them in a PR that touches no TypeScript at all.
#
# The manifests are here for the same reason as the sources: a
# dependency bump in Cargo.lock changes the compiled encryption core
# without touching a .rs file, and package.json / mise.toml carry the
# build scripts and the toolchain pin. Matching the filter in
# tests-rust.yml, which already covers all four.
- 'packages/protect-ffi/crates/**'
- 'packages/protect-ffi/src/**'
- 'packages/protect-ffi/Cargo.toml'
- 'packages/protect-ffi/Cargo.lock'
- 'packages/protect-ffi/package.json'
- 'packages/protect-ffi/mise.toml'
pull_request:
branches: ['**']
# Repeated verbatim: GitHub Actions does not support YAML anchors/aliases.
Expand All @@ -52,6 +68,22 @@ on:
- '.github/workflows/integration-prisma-next.yml'
- '.github/actions/integration-setup/**'
- '.github/actions/integration-db/**'
- '.github/actions/build-ffi-binding/**'
# The Rust that produces every EQL payload these suites round-trip.
# Absorbing protect-ffi put it in-tree, so a crate change can now
# break them in a PR that touches no TypeScript at all.
#
# The manifests are here for the same reason as the sources: a
# dependency bump in Cargo.lock changes the compiled encryption core
# without touching a .rs file, and package.json / mise.toml carry the
# build scripts and the toolchain pin. Matching the filter in
# tests-rust.yml, which already covers all four.
- 'packages/protect-ffi/crates/**'
- 'packages/protect-ffi/src/**'
- 'packages/protect-ffi/Cargo.toml'
- 'packages/protect-ffi/Cargo.lock'
- 'packages/protect-ffi/package.json'
- 'packages/protect-ffi/mise.toml'

jobs:
integration:
Expand Down Expand Up @@ -94,8 +126,9 @@ jobs:
- uses: ./.github/actions/integration-setup

# Fast pre-flight: fail in seconds if a secret was rotated or cleared,
# before the docker pull. The in-test `requireIntegrationEnv` is the
# correctness guarantee; this is the cheap one.
# before the binding build and the docker pull. The in-test
# `requireIntegrationEnv` is the correctness guarantee; this is the cheap
# one, so nothing expensive may be ordered ahead of it.
- name: Require CipherStash secrets
uses: ./.github/actions/require-cs-secrets
with:
Expand All @@ -104,6 +137,11 @@ jobs:
client-key: ${{ secrets.CS_CLIENT_KEY }}
client-access-key: ${{ secrets.CS_CLIENT_ACCESS_KEY }}

# No `wasm: true` — the prisma-next family suites go through the native
# binding only.
- name: Build the protect-ffi binding
uses: ./.github/actions/build-ffi-binding

# No pre-`up` cleanup step any more: the project name is unique per job, so
# a container leaked by a hard-killed prior run cannot hold this job's
# name or its (ephemeral) port. Blanket-pruning would now be actively
Expand Down
43 changes: 41 additions & 2 deletions .github/workflows/integration-supabase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ on:
- '.github/workflows/integration-supabase.yml'
- '.github/actions/integration-setup/**'
- '.github/actions/integration-db/**'
- '.github/actions/build-ffi-binding/**'
# The Rust that produces every EQL payload these suites round-trip.
# Absorbing protect-ffi put it in-tree, so a crate change can now
# break them in a PR that touches no TypeScript at all.
#
# The manifests are here for the same reason as the sources: a
# dependency bump in Cargo.lock changes the compiled encryption core
# without touching a .rs file, and package.json / mise.toml carry the
# build scripts and the toolchain pin. Matching the filter in
# tests-rust.yml, which already covers all four.
- 'packages/protect-ffi/crates/**'
- 'packages/protect-ffi/src/**'
- 'packages/protect-ffi/Cargo.toml'
- 'packages/protect-ffi/Cargo.lock'
- 'packages/protect-ffi/package.json'
- 'packages/protect-ffi/mise.toml'
pull_request:
branches: ['**']
paths:
Expand Down Expand Up @@ -93,6 +109,22 @@ on:
- '.github/workflows/integration-supabase.yml'
- '.github/actions/integration-setup/**'
- '.github/actions/integration-db/**'
- '.github/actions/build-ffi-binding/**'
# The Rust that produces every EQL payload these suites round-trip.
# Absorbing protect-ffi put it in-tree, so a crate change can now
# break them in a PR that touches no TypeScript at all.
#
# The manifests are here for the same reason as the sources: a
# dependency bump in Cargo.lock changes the compiled encryption core
# without touching a .rs file, and package.json / mise.toml carry the
# build scripts and the toolchain pin. Matching the filter in
# tests-rust.yml, which already covers all four.
- 'packages/protect-ffi/crates/**'
- 'packages/protect-ffi/src/**'
- 'packages/protect-ffi/Cargo.toml'
- 'packages/protect-ffi/Cargo.lock'
- 'packages/protect-ffi/package.json'
- 'packages/protect-ffi/mise.toml'

jobs:
integration:
Expand Down Expand Up @@ -154,8 +186,10 @@ jobs:
- uses: ./.github/actions/integration-setup

# Fast pre-flight: fail in seconds if a secret was rotated or cleared,
# before paying for the ~2 GB supabase/postgres pull. The in-test
# `requireIntegrationEnv` is the correctness guarantee; this is the cheap one.
# before the binding build and before paying for the ~2 GB
# supabase/postgres pull. The in-test `requireIntegrationEnv` is the
# correctness guarantee; this is the cheap one, so nothing expensive may
# be ordered ahead of it.
- name: Require CipherStash secrets
uses: ./.github/actions/require-cs-secrets
with:
Expand All @@ -164,6 +198,11 @@ jobs:
client-key: ${{ secrets.CS_CLIENT_KEY }}
client-access-key: ${{ secrets.CS_CLIENT_ACCESS_KEY }}

# No `wasm: true` — this job's CS_IT_SUITE is `integration/shared/**`
# only, which goes through the native binding.
- name: Build the protect-ffi binding
uses: ./.github/actions/build-ffi-binding

# No pre-`up` cleanup step any more: the project name is unique per job, so
# a container leaked by a hard-killed prior run cannot hold this job's
# name or its (ephemeral) port. Blanket-pruning would now be actively
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/prisma-example-readme-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,40 @@ on:
paths:
- 'examples/prisma/**'
- '.github/workflows/prisma-example-readme-e2e.yml'
# The walkthrough encrypts against the live service, so the native
# binding and the action that builds it are inputs to this suite. Added
# with that build step: without them a protect-ffi change would reach main
# having never run the walkthrough. They are repeated verbatim under
# `pull_request` below, which is what makes that a gate rather than a
# report — a PR touching any of these runs the walkthrough before the
# change lands, not after.
- '.github/actions/build-ffi-binding/**'
- 'packages/protect-ffi/crates/**'
- 'packages/protect-ffi/src/**'
- 'packages/protect-ffi/Cargo.toml'
- 'packages/protect-ffi/Cargo.lock'
- 'packages/protect-ffi/package.json'
- 'packages/protect-ffi/mise.toml'
pull_request:
branches:
- '**'
paths:
- 'examples/prisma/**'
- '.github/workflows/prisma-example-readme-e2e.yml'
# The same entries as under `push` above, and the copy that does the
# work: a PR touching the native binding or the action that builds it
# runs the walkthrough on the PR, so a protect-ffi change is gated by
# this suite rather than reaching main unexercised. (GitHub Actions has
# no YAML anchors, so the list is written twice;
# scripts/__tests__/workflow-paths-filter-parity.test.mjs compares the
# two copies.)
- '.github/actions/build-ffi-binding/**'
- 'packages/protect-ffi/crates/**'
- 'packages/protect-ffi/src/**'
- 'packages/protect-ffi/Cargo.toml'
- 'packages/protect-ffi/Cargo.lock'
- 'packages/protect-ffi/package.json'
- 'packages/protect-ffi/mise.toml'

jobs:
walkthrough:
Expand Down Expand Up @@ -72,6 +100,8 @@ jobs:

# A missing / rotated / fork-PR-absent secret makes the walkthrough skip
# its live steps silently, hiding regressions behind a green job. Fail loud.
# First, ahead of the binding build: this costs seconds and that costs
# minutes on a cold cache.
- name: Require CipherStash secrets
uses: ./.github/actions/require-cs-secrets
with:
Expand All @@ -80,6 +110,17 @@ jobs:
client-key: ${{ secrets.CS_CLIENT_KEY }}
client-access-key: ${{ secrets.CS_CLIENT_ACCESS_KEY }}

# The walkthrough encrypts against the live service, so it needs the
# native binding — `packages/protect-ffi` is a workspace package now, so
# `index.node` is a build output rather than tarball contents. This step
# runs on push to main and on any PR whose diff matches the paths filter
# above, the absorption PR that introduced the need included: that PR
# edits this workflow, the build action, and the package itself, and all
# three are in the filter. The exception is a fork PR — it triggers the
# workflow, but the job's `if` skips it for want of CS_* credentials.
- name: Build the protect-ffi binding
uses: ./.github/actions/build-ffi-binding

# Build via turbo so `^build` on `@cipherstash/stack-prisma` and
# its `@cipherstash/stack` peer is honoured. The test's
# `pnpm install` subprocess inside `examples/prisma/` is a no-op
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/prisma-next-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,40 @@ on:
- 'packages/stack-prisma/**'
- 'examples/prisma/**'
- '.github/workflows/prisma-next-e2e.yml'
# This suite encrypts against the live service, so the native binding and
# the action that builds it are inputs to it. Added with that build step:
# without them a protect-ffi change would reach main having never run this
# suite. They are repeated verbatim under `pull_request` below, which is
# what makes that a gate rather than a report — a PR touching any of these
# runs the suite before the change lands, not after.
- '.github/actions/build-ffi-binding/**'
- 'packages/protect-ffi/crates/**'
- 'packages/protect-ffi/src/**'
- 'packages/protect-ffi/Cargo.toml'
- 'packages/protect-ffi/Cargo.lock'
- 'packages/protect-ffi/package.json'
- 'packages/protect-ffi/mise.toml'
pull_request:
branches:
- '**'
paths:
- 'packages/stack-prisma/**'
- 'examples/prisma/**'
- '.github/workflows/prisma-next-e2e.yml'
# The same entries as under `push` above, and the copy that does the
# work: a PR touching the native binding or the action that builds it
# runs this suite on the PR, so a protect-ffi change is gated by it
# rather than reaching main unexercised. (GitHub Actions has no YAML
# anchors, so the list is written twice;
# scripts/__tests__/workflow-paths-filter-parity.test.mjs compares the
# two copies.)
- '.github/actions/build-ffi-binding/**'
- 'packages/protect-ffi/crates/**'
- 'packages/protect-ffi/src/**'
- 'packages/protect-ffi/Cargo.toml'
- 'packages/protect-ffi/Cargo.lock'
- 'packages/protect-ffi/package.json'
- 'packages/protect-ffi/mise.toml'

jobs:
e2e:
Expand Down Expand Up @@ -75,6 +102,8 @@ jobs:
# The global-setup hook hard-errors without CS_WORKSPACE_CRN, but a
# missing sibling secret could still degrade coverage silently — assert
# all four up front so a rotated / fork-PR-absent secret fails loudly.
# First, ahead of the binding build: this costs seconds and that costs
# minutes on a cold cache.
- name: Require CipherStash secrets
uses: ./.github/actions/require-cs-secrets
with:
Expand All @@ -83,6 +112,17 @@ jobs:
client-key: ${{ secrets.CS_CLIENT_KEY }}
client-access-key: ${{ secrets.CS_CLIENT_ACCESS_KEY }}

# This suite encrypts against the live service, so it needs the native
# binding — `packages/protect-ffi` is a workspace package now, so
# `index.node` is a build output rather than tarball contents. This step
# runs on push to main and on any PR whose diff matches the paths filter
# above, the absorption PR that introduced the need included: that PR
# edits this workflow, the build action, and the package itself, and all
# three are in the filter. The exception is a fork PR — it triggers the
# workflow, but the job's `if` skips it for want of CS_* credentials.
- name: Build the protect-ffi binding
uses: ./.github/actions/build-ffi-binding

# Write the CS_* credentials and the harness DATABASE_URL into the
# example app's .env so the runtime + the `prisma-next migration
# apply` invocation in global-setup both pick them up. The harness
Expand Down
Loading
Loading