-
Notifications
You must be signed in to change notification settings - Fork 41
105 lines (89 loc) · 3.16 KB
/
daily_run.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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"