Skip to content

Night ly runFull Network Tests #76

Night ly runFull Network Tests

Night ly runFull Network Tests #76

Workflow file for this run

name: Night ly runFull Network Tests
on:
schedule:
- cron: '0 0 * * *'
env:
CARGO_INCREMENTAL: 0 # bookkeeping for incremental builds has overhead, not useful in CI.
NODE_COUNT: 14
WORKFLOW_URL: https://github.com/maidsafe/stableset_net/actions/runs
jobs:
e2e:
name: E2E tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Install Rust
id: toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
continue-on-error: true
with:
cache-on-failure: true
sharedKey: ${{github.run_id}}
- name: install ripgrep ubuntu
run: sudo apt-get install ripgrep
if: matrix.os == 'ubuntu-latest'
- name: install ripgrep mac
run: brew install ripgrep
if: matrix.os == 'macos-latest'
- name: install ripgrep windows
run: choco install ripgrep
if: matrix.os == 'windows-latest'
- name: Run network unit tests
timeout-minutes: 25
run: cargo test --release -p safenode -- network
- name: Build sn bins
run: cargo build --release --bins
timeout-minutes: 30
- name: Start a local network
run: cargo run --release --bin testnet -- --interval 1 --node-path ./target/release/safenode
id: section-startup
env:
RUST_LOG: "safenode,safe=trace"
timeout-minutes: 10
- name: Start a client to carry out chunk actions
run: cargo run --release --bin safe -- --upload-chunks ./README.md --get-chunk confirm_uploaded
id: client-chunk-actions
env:
RUST_LOG: "safenode,safe=trace"
timeout-minutes: 2
- name: Start a client to carry out register actions
run: cargo run --release --bin safe -- --create-register myregister --query-register myregister
id: client-register-actions
env:
RUST_LOG: "safenode,safe=trace"
timeout-minutes: 2
- name: Kill all nodes
shell: bash
timeout-minutes: 1
if: failure()
continue-on-error: true
run: |
pkill safenode
echo "$(pgrep safenode | wc -l) nodes still running"
- name: Tar log files
shell: bash
continue-on-error: true
run: find ~/.safe/node/local-test-network -iname '*.log*' | tar -zcvf log_files.tar.gz --files-from -
if: failure()
- name: Upload Node Logs
uses: actions/upload-artifact@main
with:
name: sn_node_logs_e2e_${{matrix.os}}
path: log_files.tar.gz
if: failure()
continue-on-error: true
- name: post notification to slack on failure
if: ${{ failure() }}
uses: bryannice/gitactions-slack-notification@2.0.0
env:
SLACK_INCOMING_WEBHOOK: ${{ secrets.SLACK_GH_ACTIONS_WEBHOOK_URL }}
SLACK_MESSAGE: "Please check the logs for the run at ${{ env.WORKFLOW_URL }}/${{ github.run_id }}"
SLACK_TITLE: "Nightly Test Run Failed"