Merge branch 'main' of github.com:fossas/broker into ANE-1060-Broker-… #434
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dynamic analysis | |
on: push | |
jobs: | |
# Ensure tests pass on all platforms. | |
test: | |
name: test ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
toolchain: stable | |
- os: macos-latest | |
toolchain: stable | |
- os: windows-latest | |
# Windows uses 1.68 until the napi issue fixed in napi@0.4.1 | |
# percolates its way up our dependency graph. | |
# https://github.com/MSxDOS/ntapi/issues/15 | |
# (will require a new `yaque` version, since that's what transitively pulls this in). | |
toolchain: '1.68' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "dynamic-analysis" | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: nextest | |
- run: cargo nextest run | |
env: | |
RUN_INTEGRATION_TESTS: "1" | |
# nextest doesn't run doctests, but does test everything else: https://github.com/nextest-rs/nextest/issues/16 | |
# run doctests after; this won't result in any extra rebuilds and is very quick. | |
# doctest overview: https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html | |
- run: cargo test --doc | |
env: | |
RUN_INTEGRATION_TESTS: "1" | |
# Ensure every crate can actually build on all platforms. | |
# The library part of the crate is built during tests, but the binary part isn't. | |
build: | |
# Wait for the tests to pass. This reduces billed runtime compared to just running in parallel. | |
# Since it also gets to reuse the cache from the tests, it doesn't add much time to the overall process. | |
needs: test | |
name: build ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
toolchain: stable | |
- os: macos-latest | |
toolchain: stable | |
- os: windows-latest | |
# Windows uses 1.68 until the napi issue fixed in napi@0.4.1 | |
# percolates its way up our dependency graph. | |
# https://github.com/MSxDOS/ntapi/issues/15 | |
# (will require a new `yaque` version, since that's what transitively pulls this in). | |
toolchain: '1.68' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "dynamic-analysis" | |
- run: cargo build |