-
Notifications
You must be signed in to change notification settings - Fork 52
156 lines (134 loc) · 4.75 KB
/
node_man_tests.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
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/[email protected]
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-cache-${{ hashFiles('**/Cargo.lock') }}
- shell: bash
run: cargo test --lib --package sn-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 safenode --bin faucet
# timeout-minutes: 30
# - name: Start a local network
# uses: maidsafe/sn-local-testnet-action@main
# with:
# action: start
# interval: 2000
# node-path: target/release/safenode
# faucet-path: target/release/faucet
# platform: ${{ matrix.os }}
# build: true
# - name: Check SAFE_PEERS was set
# shell: bash
# run: |
# if [[ -z "$SAFE_PEERS" ]]; then
# echo "The SAFE_PEERS variable has not been set"
# exit 1
# else
# echo "SAFE_PEERS has been set to $SAFE_PEERS"
# fi
# - shell: bash
# run: |
# cargo test --package sn-node-manager --release --test e2e -- --nocapture
# - name: Stop the local network and upload logs
# if: always()
# uses: maidsafe/sn-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 safenode --bin faucet
# timeout-minutes: 30
# - name: Start a local network
# uses: maidsafe/sn-local-testnet-action@main
# with:
# action: start
# interval: 2000
# node-path: target/release/safenode
# faucet-path: target/release/faucet
# platform: ${{ matrix.os }}
# build: true
# - name: Check SAFE_PEERS was set
# shell: bash
# run: |
# if [[ -z "$SAFE_PEERS" ]]; then
# echo "The SAFE_PEERS variable has not been set"
# exit 1
# else
# echo "SAFE_PEERS has been set to $SAFE_PEERS"
# fi
# - shell: bash
# if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
# run: |
# ${{ matrix.elevated }} rustup default stable
# ${{ matrix.elevated }} cargo test --package sn-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 sn-node-manager --test e2e -- --nocapture
# - name: Stop the local network and upload logs
# if: always()
# uses: maidsafe/sn-local-testnet-action@main
# with:
# action: stop
# log_file_prefix: node_man_tests_system_wide
# platform: ${{ matrix.os }}