Skip to content
Merged
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
106 changes: 99 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ jobs:

rust:
name: Rust quality gate
env:
# Incremental data is large and useless to the next checkout.
CARGO_INCREMENTAL: 0
needs: changes
if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
Expand All @@ -82,6 +85,18 @@ jobs:
rustup default stable
rustup component add rustfmt clippy
rustc --version
echo "RUSTC_VERSION=$(rustc --version | cut -d' ' -f2)" >> "$GITHUB_ENV"
# What the last run with this Cargo.lock and Rust compiled. Cargo
# rebuilds this tree's own crates (a fresh checkout is newer than
# them) and takes the dependencies as they are.
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: rust-gate-${{ runner.os }}-rust${{ env.RUSTC_VERSION }}-${{ hashFiles('Cargo.lock') }}
- name: Check formatting
run: cargo fmt --all -- --check
- name: Deny Clippy warnings
Expand Down Expand Up @@ -133,6 +148,9 @@ jobs:
# checkout's path at run time, which every journey job's checkout
# shares; each builds the console itself.
name: The engine the journeys run against
env:
# Incremental data is large and useless to the next checkout.
CARGO_INCREMENTAL: 0
needs: changes
if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
Expand All @@ -144,6 +162,18 @@ jobs:
rustup update stable --no-self-update
rustup default stable
rustc --version
echo "RUSTC_VERSION=$(rustc --version | cut -d' ' -f2)" >> "$GITHUB_ENV"
# The debug engine's compiled dependencies, restored by every job that
# builds it; this job is the one that saves them, when Cargo.lock or
# Rust moves. Cargo rebuilds this tree's own crates each time.
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: engine-debug-${{ runner.os }}-rust${{ env.RUSTC_VERSION }}-${{ hashFiles('Cargo.lock') }}
- name: Build the engine the browser journeys run against
run: cargo build --locked --bin firenook
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
Expand All @@ -158,7 +188,8 @@ jobs:
# runner it would not fit one job's budget. Each Playwright project (one
# engine profile) ran as a job of its own; the six short ones (3-6
# minutes) now run in pairs, so the run asks for three fewer runners and
# waits less for them, and shell (about 10) stays alone.
# waits less for them. Shell (about 10) is two jobs: the typing journey
# over the Firestore pages, which alone is over 4 minutes, and the rest.
name: Console journeys (${{ matrix.name }})
needs: journey-engine
runs-on: ubuntu-latest
Expand All @@ -170,7 +201,8 @@ jobs:
- {name: data and storage, key: data-storage, projects: --project data --project storage}
- {name: auth and messaging, key: auth-messaging, projects: --project auth --project messaging}
- {name: compute and observe, key: compute-observe, projects: --project compute --project observe}
- {name: shell, key: shell, projects: --project shell}
- {name: 'shell, typing on Firestore', key: shell-typing-firestore, projects: '--project shell --grep "Firestore.*: every field keeps"'}
- {name: 'shell, the rest', key: shell, projects: '--project shell --grep-invert "Firestore.*: every field keeps"'}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
Expand Down Expand Up @@ -314,6 +346,15 @@ jobs:
rustup update stable --no-self-update
rustup default stable
rustc --version
echo "RUSTC_VERSION=$(rustc --version | cut -d' ' -f2)" >> "$GITHUB_ENV"
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: engine-debug-${{ runner.os }}-rust${{ env.RUSTC_VERSION }}-${{ hashFiles('Cargo.lock') }}
- name: Run the npm package's tests on Node ${{ matrix.node }}
run: '"$FUNCTIONS_NODE" --test packaging/*.test.mjs'
- name: Run the Functions runtime's tests with the workers on Node ${{ matrix.node }}
Expand Down Expand Up @@ -449,6 +490,15 @@ jobs:
rustup update stable --no-self-update
rustup default stable
rustc --version
echo "RUSTC_VERSION=$(rustc --version | cut -d' ' -f2)" >> "$GITHUB_ENV"
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: engine-debug-${{ runner.os }}-rust${{ env.RUSTC_VERSION }}-${{ hashFiles('Cargo.lock') }}
- name: Install pinned harness dependencies
run: npm ci --prefix conformance
- name: Type-check harness
Expand Down Expand Up @@ -595,16 +645,24 @@ jobs:
# The Functions, Cloud Tasks, Auth and Pub/Sub oracle corpus replays
# (about 9 minutes) beside the harness rather than in it, where they were
# its longest steps: they compare recorded answers and start no Java.
# Two jobs of about equal length: Functions with Cloud Tasks, and Auth
# with Pub/Sub.
oracle-replays:
name: Oracle corpus replays
name: Oracle corpus replays (${{ matrix.name }})
needs: changes
if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- {name: Functions and Cloud Tasks, key: functions}
- {name: Auth and Pub/Sub, key: auth-pubsub}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Note the recorded cases each replay compares
run: echo "FIRENOOK_CONFORMANCE_LEDGER=$RUNNER_TEMP/conformance-ledger/oracle-replays" >> "$GITHUB_ENV"
run: echo "FIRENOOK_CONFORMANCE_LEDGER=$RUNNER_TEMP/conformance-ledger/oracle-replays-${{ matrix.key }}" >> "$GITHUB_ENV"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24.20.0
Expand All @@ -617,13 +675,25 @@ jobs:
rustup update stable --no-self-update
rustup default stable
rustc --version
echo "RUSTC_VERSION=$(rustc --version | cut -d' ' -f2)" >> "$GITHUB_ENV"
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: engine-debug-${{ runner.os }}-rust${{ env.RUSTC_VERSION }}-${{ hashFiles('Cargo.lock') }}
- name: Build the engine the replays run against
run: cargo build --locked --bin firenook
- name: Install pinned harness dependencies and the Functions peers
run: |
npm ci --prefix conformance
npm install --prefix "$RUNNER_TEMP/firenook-devtools" --ignore-scripts --no-audit --no-fund firebase-functions@7.2.5 firebase-admin@13.10.0
if [ "${{ matrix.key }}" = functions ]; then
npm install --prefix "$RUNNER_TEMP/firenook-devtools" --ignore-scripts --no-audit --no-fund firebase-functions@7.2.5 firebase-admin@13.10.0
fi
- name: Replay the Functions runtime and Extensions oracle corpus
if: matrix.key == 'functions'
env:
FIREBASE_FUNCTIONS_7_2_ROOT: ${{ runner.temp }}/firenook-devtools/node_modules/firebase-functions
FIRENOOK_OFFLINE: "1"
Expand All @@ -633,6 +703,7 @@ jobs:
--profiles main,v1-blocking,inspect,ext-missing-param \
--output "$RUNNER_TEMP/firenook-functions-runtime-replay.json"
- name: Replay the Cloud Tasks oracle corpus against the suite
if: matrix.key == 'functions'
env:
FIREBASE_FUNCTIONS_7_2_ROOT: ${{ runner.temp }}/firenook-devtools/node_modules/firebase-functions
FIRENOOK_OFFLINE: "1"
Expand All @@ -643,24 +714,27 @@ jobs:
--fixture fixtures/tasks-v1/emulator-programs.json \
--output "$RUNNER_TEMP/firenook-tasks-replay.json"
- name: Replay the Auth oracle corpus against the standalone Auth service
if: matrix.key == 'auth-pubsub'
run: |
npm run replay:auth --prefix conformance -- \
--binary ../target/debug/firenook \
--output "$RUNNER_TEMP/firenook-auth-replay.json"
- name: Replay the Pub/Sub oracle corpus over gRPC and HTTP/JSON
if: matrix.key == 'auth-pubsub'
run: |
npm run replay:pubsub --prefix conformance -- \
--binary ../target/debug/firenook \
--output "$RUNNER_TEMP/firenook-pubsub-replay.json"
- name: Verify the pinned Pub/Sub client library against Firenook
if: matrix.key == 'auth-pubsub'
run: |
npm run verify:pubsub:client --prefix conformance -- \
--binary ../target/debug/firenook \
--output "$RUNNER_TEMP/firenook-pubsub-client.json"
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
if: always()
with:
name: oracle-replays
name: oracle-replays-${{ matrix.key }}
path: |
${{ runner.temp }}/firenook-functions-runtime-replay.json
${{ runner.temp }}/firenook-tasks-replay.json
Expand All @@ -670,7 +744,7 @@ jobs:
if-no-files-found: ignore
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: conformance-ledger-oracle-replays
name: conformance-ledger-oracle-replays-${{ matrix.key }}
path: ${{ runner.temp }}/conformance-ledger
retention-days: 7
if-no-files-found: error
Expand Down Expand Up @@ -699,6 +773,15 @@ jobs:
rustup update stable --no-self-update
rustup default stable
rustc --version
echo "RUSTC_VERSION=$(rustc --version | cut -d' ' -f2)" >> "$GITHUB_ENV"
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: engine-debug-${{ runner.os }}-rust${{ env.RUSTC_VERSION }}-${{ hashFiles('Cargo.lock') }}
- name: Install pinned harness dependencies
run: npm ci --prefix conformance
- name: Replay kindless queries and recursiveDelete in memory and disk/WAL
Expand Down Expand Up @@ -793,6 +876,15 @@ jobs:
rustup update stable --no-self-update
rustup default stable
rustc --version
echo "RUSTC_VERSION=$(rustc --version | cut -d' ' -f2)" >> "$GITHUB_ENV"
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: engine-debug-${{ runner.os }}-rust${{ env.RUSTC_VERSION }}-${{ hashFiles('Cargo.lock') }}
- name: Install Firenook conformance dependencies
run: npm ci --prefix conformance
- name: Install pinned Firebase JS SDK dependencies
Expand Down
Loading