Skip to content
Merged
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
13 changes: 11 additions & 2 deletions .github/actions/setup-integration-test-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ runs:
shell: bash
run: echo "node-version=$(grep '^nodejs ' .tool-versions | awk '{print $2}')" >> "$GITHUB_OUTPUT"

- name: Retrieve Viceroy version
id: viceroy-version
if: ${{ inputs.install-viceroy == 'true' }}
shell: bash
# `.tool-versions` is the single source of truth for the Viceroy pin.
# 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"

- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
Expand All @@ -58,12 +67,12 @@ runs:
uses: actions/cache@v4
with:
path: ~/.cargo/bin/viceroy
key: viceroy-${{ runner.os }}-v0.16.4
key: viceroy-${{ runner.os }}-v${{ steps.viceroy-version.outputs.viceroy-version }}

- name: Install Viceroy
if: ${{ inputs.install-viceroy == 'true' && steps.cache-viceroy.outputs.cache-hit != 'true' }}
shell: bash
run: cargo install --git https://github.com/fastly/Viceroy --tag v0.16.4 viceroy
run: cargo install --git https://github.com/fastly/Viceroy --tag v${{ steps.viceroy-version.outputs.viceroy-version }} viceroy

- name: Build WASM binary
if: ${{ inputs.build-wasm == 'true' }}
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,32 @@ 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
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
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
Loading