Files
iroh/.github/workflows/tests.yaml
T
dependabot[bot] 2e74408863 chore(deps): bump taiki-e/install-action from 2.90.1 to 2.90.3 in the github-actions group (#4704)
Bumps the github-actions group with 1 update:
[taiki-e/install-action](https://github.com/taiki-e/install-action).

Updates `taiki-e/install-action` from 2.90.1 to 2.90.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's
releases</a>.</em></p>
<blockquote>
<h2>2.90.3</h2>
<ul>
<li>
<p>Update <code>yq@latest</code> to 4.54.2.</p>
</li>
<li>
<p>Update <code>vacuum@latest</code> to 0.39.3.</p>
</li>
<li>
<p>Update <code>syft@latest</code> to 1.57.0.</p>
</li>
<li>
<p>Update <code>rclone@latest</code> to 1.76.0.</p>
</li>
<li>
<p>Update <code>protoc-gen-connect-openapi@latest</code> to 0.30.0.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.11.3.</p>
</li>
<li>
<p>Update <code>kingfisher@latest</code> to 2.17.0.</p>
</li>
<li>
<p>Update <code>biome@latest</code> to 2.6.6.</p>
</li>
</ul>
<h2>2.90.2</h2>
<ul>
<li>
<p>Update <code>trivy@latest</code> to 0.76.2.</p>
</li>
<li>
<p>Update <code>tombi@latest</code> to 1.10.0.</p>
</li>
<li>
<p>Update <code>prek@latest</code> to 0.5.10.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.11.2.</p>
</li>
<li>
<p>Update <code>mdbook-d2@latest</code> to 0.3.10.</p>
</li>
<li>
<p>Update <code>cargo-zigbuild@latest</code> to 0.24.1.</p>
</li>
<li>
<p>Update <code>cargo-tarpaulin@latest</code> to 0.37.6.</p>
</li>
<li>
<p>Update <code>biome@latest</code> to 2.6.5.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>This project adheres to <a href="https://semver.org">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased]</h2>
<h2>[2.90.6] - 2026-11-18</h2>
<ul>
<li>
<p>Update <code>wasmtime@latest</code> to 50.0.2.</p>
</li>
<li>
<p>Update <code>vacuum@latest</code> to 0.41.0.</p>
</li>
<li>
<p>Update <code>uv@latest</code> to 0.13.9.</p>
</li>
<li>
<p>Update <code>tombi@latest</code> to 1.11.3.</p>
</li>
<li>
<p>Update <code>syft@latest</code> to 1.57.2.</p>
</li>
<li>
<p>Update <code>prek@latest</code> to 0.5.11.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.11.9.</p>
</li>
<li>
<p>Update <code>kingfisher@latest</code> to 2.19.1.</p>
</li>
<li>
<p>Update <code>dprint@latest</code> to 0.65.0.</p>
</li>
<li>
<p>Update <code>cargo-machete@latest</code> to 0.10.1.</p>
</li>
<li>
<p>Update <code>cargo-deny@latest</code> to 0.21.0.</p>
</li>
<li>
<p>Update <code>biome@latest</code> to 2.6.8.</p>
</li>
</ul>
<h2>[2.90.5] - 2026-11-15</h2>
<ul>
<li>
<p>Update <code>mise@latest</code> to 2026.11.8.</p>
</li>
<li>
<p>Update <code>cargo-nextest@latest</code> to 0.9.152.</p>
</li>
</ul>
<h2>[2.90.4] - 2026-11-14</h2>
<ul>
<li>
<p>Update <code>yq@latest</code> to 4.54.3.</p>
</li>
<li>
<p>Update <code>vacuum@latest</code> to 0.40.1.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/taiki-e/install-action/commit/cfdb7ed4ccc7c7dce37759eae89dc5674b469b39"><code>cfdb7ed</code></a>
Release 2.90.3</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/0a7121930a2b50a86493394ff371be5944d87f42"><code>0a71219</code></a>
Update <code>yq@latest</code> to 4.54.2</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/4072c983d74b307847287f7220fce7a9c141b992"><code>4072c98</code></a>
Update <code>vacuum@latest</code> to 0.39.3</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/d429e9b8ea70b66f46e73feb606ddc9ee0f4efde"><code>d429e9b</code></a>
Update <code>syft@latest</code> to 1.57.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/24c26286aac008b9637a57b31fe0b3ddb2bd4ded"><code>24c2628</code></a>
Update <code>rclone@latest</code> to 1.76.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/ab9bbc83facfaf93b4b8c40d6b13ddc1bb0169a3"><code>ab9bbc8</code></a>
Update <code>protoc-gen-connect-openapi@latest</code> to 0.30.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/4bff33fa4dd584dfccaa7582398a2b31ddd8f0cb"><code>4bff33f</code></a>
Update <code>mise@latest</code> to 2026.11.3</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/cdf8dc3a14f3d788d3da291c51381dd2849ae5cf"><code>cdf8dc3</code></a>
Update <code>kingfisher@latest</code> to 2.17.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/b8b14a4959fcb616bab58d718dcffcc06ecc6bdb"><code>b8b14a4</code></a>
Update <code>biome@latest</code> to 2.6.6</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/3a3daafd3b7f23b8f65d9f5ba2db203fb59b79e2"><code>3a3daaf</code></a>
Release 2.90.2</li>
<li>Additional commits viewable in <a
href="https://github.com/taiki-e/install-action/compare/c509219cf42fba86913069efd0ade2458c59337b...cfdb7ed4ccc7c7dce37759eae89dc5674b469b39">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=taiki-e/install-action&package-manager=github_actions&previous-version=2.90.1&new-version=2.90.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-19 22:54:12 +00:00

287 lines
10 KiB
YAML

# Run all tests, with or without flaky tests.
name: Tests
on:
workflow_call:
inputs:
rust-version:
description: "The version of the rust compiler to run"
type: string
default: "stable"
flaky:
description: "Whether to also run flaky tests"
type: boolean
default: false
git-ref:
description: "Which git ref to checkout"
type: string
default: ${{ github.ref }}
env:
RUST_BACKTRACE: 1
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings
SCCACHE_CACHE_SIZE: "10G"
CRATES_LIST: "iroh,iroh-bench,iroh-dns-server,iroh-relay"
IROH_FORCE_STAGING_RELAYS: "1"
NEXTEST_VERSION: "0.9.80"
# Default to read-only; jobs that need more grant it explicitly.
permissions:
contents: read
jobs:
build_and_test_nix:
timeout-minutes: 30
name: "Tests"
runs-on: ${{ matrix.runs_on }}
strategy:
fail-fast: false
matrix:
name: [ubuntu-latest, macOS-arm-latest]
rust: ["${{ inputs.rust-version }}"]
features: [all, none, default]
include:
- name: ubuntu-latest
os: ubuntu-latest
release-os: linux
release-arch: amd64
runs_on: blacksmith-8vcpu-ubuntu-2404
- name: macOS-arm-latest
os: macOS-latest
release-os: darwin
release-arch: aarch64
runs_on: blacksmith-6vcpu-macos-26
env:
RUSTC_WRAPPER: "sccache"
SCCACHE_GHA_ENABLED: "on"
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ inputs.git-ref }}
- name: Install ${{ matrix.rust }} rust
uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
with:
toolchain: ${{ matrix.rust }}
- name: Install cargo-nextest
uses: taiki-e/install-action@cfdb7ed4ccc7c7dce37759eae89dc5674b469b39 # v2.90.3
with:
tool: nextest@${{ env.NEXTEST_VERSION }}
- name: Install sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
continue-on-error: true
- uses: $/.github/workflows/sccache-probe
- name: Select features
run: |
case "${{ matrix.features }}" in
all)
echo "FEATURES=--all-features" >> "$GITHUB_ENV"
;;
none)
echo "FEATURES=--no-default-features" >> "$GITHUB_ENV"
;;
default)
echo "FEATURES=" >> "$GITHUB_ENV"
;;
*)
exit 1
esac
- name: check features
if: ${{ ! inputs.flaky }}
run: |
for i in ${CRATES_LIST//,/ }
do
echo "Checking $i $FEATURES"
targets="--lib --bins"
echo cargo check --locked -p $i $FEATURES $targets
cargo check --locked -p $i $FEATURES $targets
done
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
- name: build tests
run: |
cargo nextest run --locked --workspace $FEATURES --lib --bins --tests --no-run
- name: list ignored tests
run: |
cargo nextest list --locked --workspace $FEATURES --lib --bins --tests --run-ignored ignored-only
- name: run tests
run: |
mkdir -p output
cargo nextest run --locked --workspace $FEATURES --lib --bins --tests --profile ci --run-ignored "$RUN_IGNORED" $VERBOSE --no-fail-fast --message-format "$MSG_FORMAT" > "output/$OUT_NAME.json"
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
NEXTEST_EXPERIMENTAL_LIBTEST_JSON: 1
RUN_IGNORED: ${{ inputs.flaky && 'all' || 'default' }}
VERBOSE: ${{ inputs.flaky && '--verbose' || '' }}
MSG_FORMAT: ${{ inputs.flaky && 'libtest-json' || 'human' }}
OUT_NAME: ${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}
- name: upload results
if: ${{ failure() && inputs.flaky }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: libtest_run_${{ github.run_number }}-${{ github.run_attempt }}-${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}.json
path: output
retention-days: 45
compression-level: 0
- name: doctests
if: ${{ (! inputs.flaky) && matrix.features == 'all' }}
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
run: |
cargo test --locked --workspace --all-features --doc
# We can not check the doctest features by only compiling them,
# so are forced to run them once more.
- name: Check doctest features
if: ${{ ! inputs.flaky }}
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
run: |
for i in ${CRATES_LIST//,/ }
do
echo "Checking $i doctest $FEATURES"
echo cargo test --locked -p $i --doc $FEATURES
cargo test --locked -p $i --doc $FEATURES
done
build_and_test_windows:
timeout-minutes: 30
name: "Tests"
runs-on: blacksmith-8vcpu-windows-2025
strategy:
fail-fast: false
matrix:
name: [windows-latest]
rust: ["${{ inputs.rust-version}}"]
features: [all, none, default]
target:
- x86_64-pc-windows-msvc
env:
RUSTC_WRAPPER: "sccache"
SCCACHE_GHA_ENABLED: "on"
# Installing a toolchain does not select it, so without this every cargo
# invocation below uses whatever the runner image ships as rustup default.
# As an env var this applies to the job only and leaves the image's
# rustup default untouched.
RUSTUP_TOOLCHAIN: "${{ matrix.rust }}"
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ inputs.git-ref }}
- name: Install ${{ matrix.rust }}
env:
RUST_TOOLCHAIN: ${{ matrix.rust }}
RUST_TARGET: ${{ matrix.target }}
# bash: pwsh steps ignore a command's exit status, so a failed rustup
# call here goes unnoticed.
shell: bash
run: |
rustup toolchain install "$RUST_TOOLCHAIN" --target "$RUST_TARGET"
rustup set default-host "$RUST_TARGET"
# Fail here rather than building with the wrong compiler if the
# requested toolchain is not the active one.
rustup show active-toolchain | grep -q "^${RUST_TOOLCHAIN}-"
rustc --version
# Was a bare Invoke-WebRequest from get.nexte.st with no checksum,
# unpacked into ~/.cargo/bin on a long-lived host.
- name: Install cargo-nextest
uses: taiki-e/install-action@cfdb7ed4ccc7c7dce37759eae89dc5674b469b39 # v2.90.3
with:
tool: nextest@${{ env.NEXTEST_VERSION }}
- name: Select features
run: |
switch ("${{ matrix.features }}") {
"all" {
echo "FEATURES=--all-features" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
}
"none" {
echo "FEATURES=--no-default-features" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
}
"default" {
echo "FEATURES=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
}
default {
Exit 1
}
}
- name: Install sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
continue-on-error: true
with:
# Pinned: sccache >= 0.17.0 expands rustc @argfiles and breaks Windows'
# 32K command line limit: https://github.com/mozilla/sccache/issues/2397
version: "v0.16.0"
- uses: $/.github/workflows/sccache-probe
- uses: msys2/setup-msys2@ec48f7c5447b3140e2b088413ae3a55687bccb6e # v2.33.0
with:
# Blacksmith's Windows image ships no pre-installed MSYS2 (C:\msys64).
release: true
- name: Install aws-lc-sys build dependencies
shell: powershell
run: |
$chocoPath = "$Env:ProgramData\chocolatey\bin\choco.exe"
if (!(Test-Path $chocoPath)) {
$chocoPath = "$Env:SystemDrive\ProgramData\chocolatey\bin\choco.exe"
}
& $chocoPath install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
& $chocoPath install nasm -y
echo "C:\Program Files\CMake\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
echo "C:\Program Files\NASM" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- name: build tests
env:
RUST_TARGET: ${{ matrix.target }}
run: |
$feat = if ($env:FEATURES) { $env:FEATURES -split '\s+' } else { @() }
cargo nextest run --locked --workspace @feat --lib --bins --tests --target $env:RUST_TARGET --no-run
- name: list ignored tests
env:
RUST_TARGET: ${{ matrix.target }}
run: |
$feat = if ($env:FEATURES) { $env:FEATURES -split '\s+' } else { @() }
cargo nextest list --locked --workspace @feat --lib --bins --tests --target $env:RUST_TARGET --run-ignored ignored-only
- name: tests
run: |
mkdir -p output
$feat = if ($env:FEATURES) { $env:FEATURES -split '\s+' } else { @() }
cargo nextest run --locked --workspace @feat --lib --bins --tests --profile ci --target $env:RUST_TARGET --run-ignored $env:RUN_IGNORED --no-fail-fast --message-format $env:MSG_FORMAT > "output/$($env:OUT_NAME).json"
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
NEXTEST_EXPERIMENTAL_LIBTEST_JSON: 1
RUST_TARGET: ${{ matrix.target }}
RUN_IGNORED: ${{ inputs.flaky && 'all' || 'default' }}
MSG_FORMAT: ${{ inputs.flaky && 'libtest-json' || 'human' }}
OUT_NAME: ${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}
- name: upload results
if: ${{ failure() && inputs.flaky }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: libtest_run_${{ github.run_number }}-${{ github.run_attempt }}-${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}.json
path: output
retention-days: 1
compression-level: 0