STR-386: pass deposits to exec #750
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
# Runs unit tests. | |
name: Unit Tests | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: [master] | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Run unit tests and generate report | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 # better fail-safe than the default 360 in github actions | |
steps: | |
- name: Cleanup space | |
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /usr/local/.ghcup | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: llvm-tools-preview | |
toolchain: nightly-2024-07-27 | |
- name: Install latest nextest release | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: nextest | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-llvm-cov | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: Run tests with coverage | |
run: | | |
cargo llvm-cov --workspace --locked nextest --profile ci --lcov --output-path lcov.info | |
- name: Test Summary | |
uses: test-summary/action@v2 | |
if: always() | |
with: | |
paths: "target/nextest/ci/junit.xml" | |
- name: Publish Test Coverage | |
uses: codecov/codecov-action@v4.5.0 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
doc: | |
name: Run doc tests | |
runs-on: ubuntu-latest | |
env: | |
RUST_BACKTRACE: 1 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: nightly-2024-07-27 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: Run doctests | |
run: cargo test --doc --workspace | |
unit-success: | |
name: Check that unit tests pass | |
runs-on: ubuntu-latest | |
if: always() | |
needs: [test, doc] | |
timeout-minutes: 60 | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |