chore: make system metric as f64 #2842
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: Node Manager Tests | |
on: | |
merge_group: | |
branches: [main, alpha*, beta*, rc*] | |
pull_request: | |
branches: ["*"] | |
env: | |
CARGO_INCREMENTAL: 0 # bookkeeping for incremental builds has overhead, not useful in CI. | |
WINSW_URL: https://github.com/winsw/winsw/releases/download/v3.0.0-alpha.11/WinSW-x64.exe | |
jobs: | |
node-manager-unit-tests: | |
name: node manager unit tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: cargo cache registry, index and build | |
uses: actions/cache@v4.1.2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-cache-${{ hashFiles('**/Cargo.lock') }} | |
- shell: bash | |
run: cargo test --lib --package ant-node-manager | |
# node-manager-user-mode-e2e-tests: | |
# name: user-mode e2e | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# include: | |
# - { os: ubuntu-latest } | |
# - { os: macos-latest } | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Install Rust | |
# uses: dtolnay/rust-toolchain@stable | |
# - uses: Swatinem/rust-cache@v2 | |
# - name: Build binaries | |
# run: cargo build --release --bin antnode --bin faucet | |
# timeout-minutes: 30 | |
# - name: Start a local network | |
# uses: maidsafe/ant-local-testnet-action@main | |
# with: | |
# action: start | |
# interval: 2000 | |
# node-path: target/release/antnode | |
# faucet-path: target/release/faucet | |
# platform: ${{ matrix.os }} | |
# build: true | |
# - name: Check ANT_PEERS was set | |
# shell: bash | |
# run: | | |
# if [[ -z "$ANT_PEERS" ]]; then | |
# echo "The ANT_PEERS variable has not been set" | |
# exit 1 | |
# else | |
# echo "ANT_PEERS has been set to $ANT_PEERS" | |
# fi | |
# - shell: bash | |
# run: | | |
# cargo test --package ant-node-manager --release --test e2e -- --nocapture | |
# - name: Stop the local network and upload logs | |
# if: always() | |
# uses: maidsafe/ant-local-testnet-action@main | |
# with: | |
# action: stop | |
# log_file_prefix: node_man_tests_user_mode | |
# platform: ${{ matrix.os }} | |
# node-manager-e2e-tests: | |
# name: system-wide e2e | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# include: | |
# - { os: ubuntu-latest, elevated: sudo -E env PATH="$PATH" } | |
# - { os: macos-latest, elevated: sudo -E } | |
# - { os: windows-latest } | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Install Rust | |
# uses: dtolnay/rust-toolchain@stable | |
# - uses: Swatinem/rust-cache@v2 | |
# - name: Build binaries | |
# run: cargo build --release --bin antnode --bin faucet | |
# timeout-minutes: 30 | |
# - name: Start a local network | |
# uses: maidsafe/ant-local-testnet-action@main | |
# with: | |
# action: start | |
# interval: 2000 | |
# node-path: target/release/antnode | |
# faucet-path: target/release/faucet | |
# platform: ${{ matrix.os }} | |
# build: true | |
# - name: Check ANT_PEERS was set | |
# shell: bash | |
# run: | | |
# if [[ -z "$ANT_PEERS" ]]; then | |
# echo "The ANT_PEERS variable has not been set" | |
# exit 1 | |
# else | |
# echo "ANT_PEERS has been set to $ANT_PEERS" | |
# fi | |
# - shell: bash | |
# if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
# run: | | |
# ${{ matrix.elevated }} rustup default stable | |
# ${{ matrix.elevated }} cargo test --package ant-node-manager --release --test e2e -- --nocapture | |
# # Powershell step runs as admin by default. | |
# - name: run integration test in powershell | |
# if: matrix.os == 'windows-latest' | |
# shell: pwsh | |
# run: | | |
# curl -L -o WinSW.exe $env:WINSW_URL | |
# New-Item -ItemType Directory -Force -Path "$env:GITHUB_WORKSPACE\bin" | |
# Move-Item -Path WinSW.exe -Destination "$env:GITHUB_WORKSPACE\bin" | |
# $env:PATH += ";$env:GITHUB_WORKSPACE\bin" | |
# cargo test --release --package ant-node-manager --test e2e -- --nocapture | |
# - name: Stop the local network and upload logs | |
# if: always() | |
# uses: maidsafe/ant-local-testnet-action@main | |
# with: | |
# action: stop | |
# log_file_prefix: node_man_tests_system_wide | |
# platform: ${{ matrix.os }} |