Files
iroh/.github/workflows/tests.yaml
T
dependabot[bot] 70367b7841 chore(deps): bump mozilla-actions/sccache-action from 0.0.5 to 0.0.6 in the github-actions group (#2763)
Bumps the github-actions group with 1 update:
[mozilla-actions/sccache-action](https://github.com/mozilla-actions/sccache-action).

Updates `mozilla-actions/sccache-action` from 0.0.5 to 0.0.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mozilla-actions/sccache-action/releases">mozilla-actions/sccache-action's
releases</a>.</em></p>
<blockquote>
<h2>v0.0.6</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: string interpolation by <a
href="https://github.com/i10416"><code>@​i10416</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/122">Mozilla-Actions/sccache-action#122</a></li>
<li>Keep GitHub Actions up to date with GitHub's Dependabot by <a
href="https://github.com/cclauss"><code>@​cclauss</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/131">Mozilla-Actions/sccache-action#131</a></li>
<li>fix: avoid downloading package when local cache exists by <a
href="https://github.com/i10416"><code>@​i10416</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/123">Mozilla-Actions/sccache-action#123</a></li>
<li>Set baseUrl for Octokit to make it work on GitHub Enterprise Server
by <a href="https://github.com/palloberg"><code>@​palloberg</code></a>
in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/144">Mozilla-Actions/sccache-action#144</a></li>
</ul>
<h2>dependencies</h2>
<ul>
<li>Bump eslint-plugin-jest from 28.5.0 to 28.6.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/130">Mozilla-Actions/sccache-action#130</a></li>
<li>Bump ts-jest from 29.1.4 to 29.2.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/134">Mozilla-Actions/sccache-action#134</a></li>
<li>Bump <code>@​types/node</code> from 20.13.0 to 20.14.11 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/133">Mozilla-Actions/sccache-action#133</a></li>
<li>Bump <code>@​typescript-eslint/eslint-plugin</code> from 7.8.0 to
7.16.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/132">Mozilla-Actions/sccache-action#132</a></li>
<li>Bump typescript from 5.4.5 to 5.5.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/128">Mozilla-Actions/sccache-action#128</a></li>
<li>Bump ts-jest from 29.2.2 to 29.2.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/141">Mozilla-Actions/sccache-action#141</a></li>
<li>Bump eslint-plugin-prettier from 5.1.3 to 5.2.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/140">Mozilla-Actions/sccache-action#140</a></li>
<li>Bump prettier from 3.3.2 to 3.3.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/136">Mozilla-Actions/sccache-action#136</a></li>
<li>Bump typescript from 5.5.3 to 5.6.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/145">Mozilla-Actions/sccache-action#145</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/i10416"><code>@​i10416</code></a> made
their first contribution in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/122">Mozilla-Actions/sccache-action#122</a></li>
<li><a href="https://github.com/cclauss"><code>@​cclauss</code></a> made
their first contribution in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/131">Mozilla-Actions/sccache-action#131</a></li>
<li><a href="https://github.com/palloberg"><code>@​palloberg</code></a>
made their first contribution in <a
href="https://redirect.github.com/Mozilla-Actions/sccache-action/pull/144">Mozilla-Actions/sccache-action#144</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Mozilla-Actions/sccache-action/compare/v0.0.5...v0.0.6">https://github.com/Mozilla-Actions/sccache-action/compare/v0.0.5...v0.0.6</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Mozilla-Actions/sccache-action/commit/9e326ebed976843c9932b3aa0e021c6f50310eb4"><code>9e326eb</code></a>
prepare version 0.0.6</li>
<li><a
href="https://github.com/Mozilla-Actions/sccache-action/commit/922a306e477207a637defe7f052d22883f0521d0"><code>922a306</code></a>
Merge pull request <a
href="https://redirect.github.com/mozilla-actions/sccache-action/issues/145">#145</a>
from Mozilla-Actions/dependabot/npm_and_yarn/typescri...</li>
<li><a
href="https://github.com/Mozilla-Actions/sccache-action/commit/2be75915275437bf5de79b87f98872a4f2f8c827"><code>2be7591</code></a>
Merge pull request <a
href="https://redirect.github.com/mozilla-actions/sccache-action/issues/136">#136</a>
from Mozilla-Actions/dependabot/npm_and_yarn/prettier...</li>
<li><a
href="https://github.com/Mozilla-Actions/sccache-action/commit/d707076e63cf36f9ad5b2c698f70fa41064cd1c5"><code>d707076</code></a>
Bump prettier from 3.3.2 to 3.3.3</li>
<li><a
href="https://github.com/Mozilla-Actions/sccache-action/commit/afb5895f805bd94d7c9879fdf5e616b6d5b7001d"><code>afb5895</code></a>
Bump typescript from 5.5.3 to 5.6.2</li>
<li><a
href="https://github.com/Mozilla-Actions/sccache-action/commit/f42f2ce8fa7c63696e83e23aae0f1d29af697dcb"><code>f42f2ce</code></a>
Merge pull request <a
href="https://redirect.github.com/mozilla-actions/sccache-action/issues/140">#140</a>
from Mozilla-Actions/dependabot/npm_and_yarn/eslint-p...</li>
<li><a
href="https://github.com/Mozilla-Actions/sccache-action/commit/ff4a61d6e6d18f1dbc1ada2764f6a53469f12ac3"><code>ff4a61d</code></a>
Merge pull request <a
href="https://redirect.github.com/mozilla-actions/sccache-action/issues/144">#144</a>
from palloberg/set-baseurl</li>
<li><a
href="https://github.com/Mozilla-Actions/sccache-action/commit/e073bd0f5c2a1b383ffaee047ebfe0d6369abca2"><code>e073bd0</code></a>
Update README with instructions on GHES usage.</li>
<li><a
href="https://github.com/Mozilla-Actions/sccache-action/commit/4a60710ed8ed21c21c93b7aa3509f4d0a145aaa7"><code>4a60710</code></a>
Set baseUrl for Octokit to make it work on GitHub Enterprise Server</li>
<li><a
href="https://github.com/Mozilla-Actions/sccache-action/commit/1ff3075b6095ae29758d1a19a53d0580fd89ad3a"><code>1ff3075</code></a>
Bump ts-jest from 29.2.2 to 29.2.5 (<a
href="https://redirect.github.com/mozilla-actions/sccache-action/issues/141">#141</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/mozilla-actions/sccache-action/compare/v0.0.5...v0.0.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mozilla-actions/sccache-action&package-manager=github_actions&previous-version=0.0.5&new-version=0.0.6)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2024-10-01 09:41:17 +02:00

230 lines
7.3 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: "50G"
CRATES_LIST: "iroh,iroh-blobs,iroh-gossip,iroh-metrics,iroh-net,iroh-net-bench,iroh-docs,iroh-test,iroh-cli,iroh-dns-server"
IROH_FORCE_STAGING_RELAYS: "1"
jobs:
build_and_test_nix:
timeout-minutes: 30
name: "Tests"
runs-on: ${{ matrix.runner }}
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
runner: [self-hosted, linux, X64]
- name: macOS-arm-latest
os: macOS-latest
release-os: darwin
release-arch: aarch64
runner: [self-hosted, macOS, ARM64]
env:
# Using self-hosted runners so use local cache for sccache and
# not SCCACHE_GHA_ENABLED.
RUSTC_WRAPPER: "sccache"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.git-ref }}
- name: Install ${{ matrix.rust }} rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.6
- 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"
if [ $i = "iroh-cli" ]; then
targets="--bins"
else
targets="--lib --bins"
fi
echo cargo check -p $i $FEATURES $targets
cargo check -p $i $FEATURES $targets
done
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
- name: build tests
run: |
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --no-run
- name: list ignored tests
run: |
cargo nextest list --workspace ${{ env.FEATURES }} --lib --bins --tests --run-ignored ignored-only
- name: run tests
run: |
mkdir -p output
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --profile ci --run-ignored ${{ inputs.flaky && 'all' || 'default' }} --no-fail-fast --message-format ${{ inputs.flaky && 'libtest-json' || 'human' }} > output/${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}.json
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
NEXTEST_EXPERIMENTAL_LIBTEST_JSON: 1
- name: upload results
if: ${{ failure() && inputs.flaky }}
uses: actions/upload-artifact@v4
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' }}
run: |
if [ -n "${{ runner.debug }}" ]; then
export RUST_LOG=TRACE
else
export RUST_LOG=DEBUG
fi
cargo test --workspace --all-features --doc
build_and_test_windows:
timeout-minutes: 30
name: "Tests"
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
name: [windows-latest]
rust: [ '${{ inputs.rust-version}}' ]
features: [all, none, default]
target:
- x86_64-pc-windows-msvc
include:
- name: windows-latest
os: windows
runner: [self-hosted, windows, x64]
env:
# Using self-hosted runners so use local cache for sccache and
# not SCCACHE_GHA_ENABLED.
RUSTC_WRAPPER: "sccache"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.git-ref }}
- name: Install ${{ matrix.rust }}
run: |
rustup toolchain install ${{ matrix.rust }}
rustup toolchain default ${{ matrix.rust }}
rustup target add ${{ matrix.target }}
rustup set default-host ${{ matrix.target }}
- name: Install cargo-nextest
shell: powershell
run: |
$tmp = New-TemporaryFile | Rename-Item -NewName { $_ -replace 'tmp$', 'zip' } -PassThru
Invoke-WebRequest -OutFile $tmp https://get.nexte.st/latest/windows
$outputDir = if ($Env:CARGO_HOME) { Join-Path $Env:CARGO_HOME "bin" } else { "~/.cargo/bin" }
$tmp | Expand-Archive -DestinationPath $outputDir -Force
$tmp | Remove-Item
- 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@v0.0.6
- uses: msys2/setup-msys2@v2
- name: build tests
run: |
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} --no-run
- name: list ignored tests
run: |
cargo nextest list --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} --run-ignored ignored-only
- name: tests
run: |
mkdir -p output
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --profile ci --target ${{ matrix.target }} --run-ignored ${{ inputs.flaky && 'all' || 'default' }} --no-fail-fast --message-format ${{ inputs.flaky && 'libtest-json' || 'human' }} > output/${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}.json
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
NEXTEST_EXPERIMENTAL_LIBTEST_JSON: 1
- name: upload results
if: ${{ failure() && inputs.flaky }}
uses: actions/upload-artifact@v4
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