|
2 | 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
3 | 3 |
|
4 | 4 | name: fiber test
|
5 |
| - |
6 | 5 | on:
|
7 | 6 | push:
|
8 |
| - branches: [ "fiber" ] |
| 7 | + branches: ["fiber"] |
9 | 8 | pull_request:
|
10 |
| - branches: [ "fiber" ] |
| 9 | + branches: ["fiber"] |
11 | 10 |
|
12 | 11 | permissions:
|
13 | 12 | contents: read
|
14 | 13 |
|
15 | 14 | jobs:
|
16 |
| - build: |
| 15 | + prepare: |
| 16 | + runs-on: ubuntu-22.04 |
| 17 | + |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v3 |
| 20 | + - name: Set up Python 3.10 |
| 21 | + uses: actions/setup-python@v3 |
| 22 | + with: |
| 23 | + python-version: "3.10" |
| 24 | + |
| 25 | + - name: Install dependencies |
| 26 | + run: | |
| 27 | + python -m pip install --upgrade pip |
| 28 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 29 | +
|
| 30 | + - name: Run make prepare |
| 31 | + run: make prepare |
| 32 | + |
| 33 | + - name: Tar backup |
| 34 | + run: | |
| 35 | + tar -czf prepare-backup.tar.gz \ |
| 36 | + download \ |
| 37 | + source/ckb-cli \ |
| 38 | + source/ckb-cli-old |
| 39 | +
|
| 40 | + - name: Backup data |
| 41 | + uses: actions/upload-artifact@v4 |
| 42 | + with: |
| 43 | + name: prepare-backup-${{ runner.os }} |
| 44 | + path: prepare-backup.tar.gz |
| 45 | + |
| 46 | + fiber_test_open_channel: |
| 47 | + needs: prepare |
| 48 | + runs-on: ubuntu-22.04 |
| 49 | + |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v3 |
| 52 | + - name: Set up Python 3.10 |
| 53 | + uses: actions/setup-python@v3 |
| 54 | + with: |
| 55 | + python-version: "3.10" |
| 56 | + |
| 57 | + - name: Install dependencies |
| 58 | + run: | |
| 59 | + python -m pip install --upgrade pip |
| 60 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 61 | +
|
| 62 | + - name: Download prepare backup |
| 63 | + uses: actions/download-artifact@v4 |
| 64 | + with: |
| 65 | + name: prepare-backup-${{ runner.os }} |
| 66 | + path: ./ |
| 67 | + |
| 68 | + - name: Extract tarball and restore permissions |
| 69 | + run: | |
| 70 | + tar -xzf prepare-backup.tar.gz |
| 71 | +
|
| 72 | + - name: Run fiber_test_demo |
| 73 | + run: make fiber_test_demo FIBER_TEST_DEMO=test_cases/fiber/devnet/open_channel |
| 74 | + |
| 75 | + - name: Publish reports |
| 76 | + if: failure() |
| 77 | + uses: actions/upload-artifact@v4 |
| 78 | + with: |
| 79 | + name: jfoa-open_channel-reports-${{ runner.os }} |
| 80 | + path: ./report |
| 81 | + |
| 82 | + fiber_test_accept_channel_cancel_invoice_connect_peer_disconnect_peer: |
| 83 | + needs: prepare |
| 84 | + runs-on: ubuntu-22.04 |
| 85 | + |
| 86 | + steps: |
| 87 | + - uses: actions/checkout@v3 |
| 88 | + - name: Set up Python 3.10 |
| 89 | + uses: actions/setup-python@v3 |
| 90 | + with: |
| 91 | + python-version: "3.10" |
| 92 | + |
| 93 | + - name: Install dependencies |
| 94 | + run: | |
| 95 | + python -m pip install --upgrade pip |
| 96 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 97 | +
|
| 98 | + - name: Download prepare backup |
| 99 | + uses: actions/download-artifact@v4 |
| 100 | + with: |
| 101 | + name: prepare-backup-${{ runner.os }} |
| 102 | + path: ./ |
| 103 | + |
| 104 | + - name: Extract tarball and restore permissions |
| 105 | + run: | |
| 106 | + tar -xzf prepare-backup.tar.gz |
| 107 | +
|
| 108 | + - name: Run fiber_test_demo |
| 109 | + run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/accept_channel test_cases/fiber/devnet/cancel_invoice test_cases/fiber/devnet/connect_peer test_cases/fiber/devnet/disconnect_peer" |
| 110 | + |
| 111 | + - name: Publish reports |
| 112 | + if: failure() |
| 113 | + uses: actions/upload-artifact@v4 |
| 114 | + with: |
| 115 | + name: jfoa-accept_channel_to_disconnect_peer-reports-${{ runner.os }} |
| 116 | + path: ./report |
| 117 | + |
| 118 | + fiber_test_get_invoice_graph_channels_graph_nodes_list_channels_new_invoice: |
| 119 | + needs: prepare |
| 120 | + runs-on: ubuntu-22.04 |
| 121 | + |
| 122 | + steps: |
| 123 | + - uses: actions/checkout@v3 |
| 124 | + - name: Set up Python 3.10 |
| 125 | + uses: actions/setup-python@v3 |
| 126 | + with: |
| 127 | + python-version: "3.10" |
| 128 | + |
| 129 | + - name: Install dependencies |
| 130 | + run: | |
| 131 | + python -m pip install --upgrade pip |
| 132 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 133 | +
|
| 134 | + - name: Download prepare backup |
| 135 | + uses: actions/download-artifact@v4 |
| 136 | + with: |
| 137 | + name: prepare-backup-${{ runner.os }} |
| 138 | + path: ./ |
| 139 | + |
| 140 | + - name: Extract tarball and restore permissions |
| 141 | + run: | |
| 142 | + tar -xzf prepare-backup.tar.gz |
| 143 | +
|
| 144 | + - name: Run fiber_test_demo |
| 145 | + run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/get_invoice test_cases/fiber/devnet/graph_channels test_cases/fiber/devnet/graph_nodes test_cases/fiber/devnet/list_channels test_cases/fiber/devnet/new_invoice" |
| 146 | + |
| 147 | + - name: Publish reports |
| 148 | + if: failure() |
| 149 | + uses: actions/upload-artifact@v4 |
| 150 | + with: |
| 151 | + name: jfoa-accept_channel_to_disconnect_peer-reports-${{ runner.os }} |
| 152 | + path: ./report |
| 153 | + |
| 154 | + fiber_test_send_payment_module_offline: |
| 155 | + needs: prepare |
| 156 | + runs-on: ubuntu-22.04 |
| 157 | + |
| 158 | + steps: |
| 159 | + - uses: actions/checkout@v3 |
| 160 | + - name: Set up Python 3.10 |
| 161 | + uses: actions/setup-python@v3 |
| 162 | + with: |
| 163 | + python-version: "3.10" |
| 164 | + |
| 165 | + - name: Install dependencies |
| 166 | + run: | |
| 167 | + python -m pip install --upgrade pip |
| 168 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 169 | +
|
| 170 | + - name: Download prepare backup |
| 171 | + uses: actions/download-artifact@v4 |
| 172 | + with: |
| 173 | + name: prepare-backup-${{ runner.os }} |
| 174 | + path: ./ |
| 175 | + |
| 176 | + - name: Extract tarball and restore permissions |
| 177 | + run: | |
| 178 | + tar -xzf prepare-backup.tar.gz |
| 179 | +
|
| 180 | + - name: Run fiber_test_demo |
| 181 | + run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/send_payment/module test_cases/fiber/devnet/send_payment/offline" |
| 182 | + |
| 183 | + - name: Publish reports |
| 184 | + if: failure() |
| 185 | + uses: actions/upload-artifact@v4 |
| 186 | + with: |
| 187 | + name: jfoa-send_payment-module-offline-reports-${{ runner.os }} |
| 188 | + path: ./report |
| 189 | + |
| 190 | + fiber_test_send_payment_params_path: |
| 191 | + needs: prepare |
| 192 | + runs-on: ubuntu-22.04 |
| 193 | + |
| 194 | + steps: |
| 195 | + - uses: actions/checkout@v3 |
| 196 | + - name: Set up Python 3.10 |
| 197 | + uses: actions/setup-python@v3 |
| 198 | + with: |
| 199 | + python-version: "3.10" |
| 200 | + |
| 201 | + - name: Install dependencies |
| 202 | + run: | |
| 203 | + python -m pip install --upgrade pip |
| 204 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 205 | +
|
| 206 | + - name: Download prepare backup |
| 207 | + uses: actions/download-artifact@v4 |
| 208 | + with: |
| 209 | + name: prepare-backup-${{ runner.os }} |
| 210 | + path: ./ |
| 211 | + |
| 212 | + - name: Extract tarball and restore permissions |
| 213 | + run: | |
| 214 | + tar -xzf prepare-backup.tar.gz |
| 215 | +
|
| 216 | + - name: Run fiber_test_demo |
| 217 | + run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/send_payment/params test_cases/fiber/devnet/send_payment/path" |
| 218 | + |
| 219 | + - name: Publish reports |
| 220 | + if: failure() |
| 221 | + uses: actions/upload-artifact@v4 |
| 222 | + with: |
| 223 | + name: jfoa-send_payment-params-path-reports-${{ runner.os }} |
| 224 | + path: ./report |
| 225 | + |
| 226 | + |
| 227 | + fiber_test_shutdown_channel_update_channel_issue: |
| 228 | + needs: prepare |
| 229 | + runs-on: ubuntu-22.04 |
| 230 | + |
| 231 | + steps: |
| 232 | + - uses: actions/checkout@v3 |
| 233 | + - name: Set up Python 3.10 |
| 234 | + uses: actions/setup-python@v3 |
| 235 | + with: |
| 236 | + python-version: "3.10" |
| 237 | + |
| 238 | + - name: Install dependencies |
| 239 | + run: | |
| 240 | + python -m pip install --upgrade pip |
| 241 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 242 | +
|
| 243 | + - name: Download prepare backup |
| 244 | + uses: actions/download-artifact@v4 |
| 245 | + with: |
| 246 | + name: prepare-backup-${{ runner.os }} |
| 247 | + path: ./ |
| 248 | + |
| 249 | + - name: Extract tarball and restore permissions |
| 250 | + run: | |
| 251 | + tar -xzf prepare-backup.tar.gz |
| 252 | +
|
| 253 | + - name: Run fiber_test_demo |
| 254 | + run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/shutdown_channel test_cases/fiber/devnet/update_channel test_cases/fiber/devnet/issue" |
| 255 | + |
| 256 | + - name: Publish reports |
| 257 | + if: failure() |
| 258 | + uses: actions/upload-artifact@v4 |
| 259 | + with: |
| 260 | + name: jfoa-send_payment-reports-${{ runner.os }} |
| 261 | + path: ./report |
| 262 | + |
| 263 | + |
| 264 | + fiber_test_watch_tower: |
| 265 | + needs: prepare |
| 266 | + runs-on: ubuntu-22.04 |
| 267 | + |
| 268 | + steps: |
| 269 | + - uses: actions/checkout@v3 |
| 270 | + - name: Set up Python 3.10 |
| 271 | + uses: actions/setup-python@v3 |
| 272 | + with: |
| 273 | + python-version: "3.10" |
| 274 | + |
| 275 | + - name: Install dependencies |
| 276 | + run: | |
| 277 | + python -m pip install --upgrade pip |
| 278 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 279 | +
|
| 280 | + - name: Download prepare backup |
| 281 | + uses: actions/download-artifact@v4 |
| 282 | + with: |
| 283 | + name: prepare-backup-${{ runner.os }} |
| 284 | + path: ./ |
| 285 | + |
| 286 | + - name: Extract tarball and restore permissions |
| 287 | + run: | |
| 288 | + tar -xzf prepare-backup.tar.gz |
| 289 | +
|
| 290 | + - name: Run fiber_test_demo |
| 291 | + run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/watch_tower" |
| 292 | + - name: Publish reports |
| 293 | + if: failure() |
| 294 | + uses: actions/upload-artifact@v4 |
| 295 | + with: |
| 296 | + name: jfoa-watch_tower-reports-${{ runner.os }} |
| 297 | + path: ./report |
| 298 | + |
| 299 | + |
| 300 | + fiber_test_watch_tower_tlc: |
| 301 | + needs: prepare |
| 302 | + runs-on: ubuntu-22.04 |
| 303 | + |
| 304 | + steps: |
| 305 | + - uses: actions/checkout@v3 |
| 306 | + - name: Set up Python 3.10 |
| 307 | + uses: actions/setup-python@v3 |
| 308 | + with: |
| 309 | + python-version: "3.10" |
| 310 | + |
| 311 | + - name: Install dependencies |
| 312 | + run: | |
| 313 | + python -m pip install --upgrade pip |
| 314 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 315 | +
|
| 316 | + - name: Download prepare backup |
| 317 | + uses: actions/download-artifact@v4 |
| 318 | + with: |
| 319 | + name: prepare-backup-${{ runner.os }} |
| 320 | + path: ./ |
| 321 | + |
| 322 | + - name: Extract tarball and restore permissions |
| 323 | + run: | |
| 324 | + tar -xzf prepare-backup.tar.gz |
| 325 | +
|
| 326 | + - name: Run fiber_test_demo |
| 327 | + run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/watch_tower_wit_tlc" |
| 328 | + - name: Publish reports |
| 329 | + if: failure() |
| 330 | + uses: actions/upload-artifact@v4 |
| 331 | + with: |
| 332 | + name: jfoa-watch_tower-reports-${{ runner.os }} |
| 333 | + path: ./report |
| 334 | + |
| 335 | + |
17 | 336 |
|
| 337 | + fiber_test_send_payment_debug_mixed: |
| 338 | + needs: prepare |
18 | 339 | runs-on: ubuntu-22.04
|
19 | 340 |
|
20 | 341 | steps:
|
21 |
| - - uses: actions/checkout@v3 |
22 |
| - - name: Set up Python 3.10 |
23 |
| - uses: actions/setup-python@v3 |
24 |
| - with: |
25 |
| - python-version: "3.10" |
| 342 | + - uses: actions/checkout@v3 |
| 343 | + - name: Set up Python 3.10 |
| 344 | + uses: actions/setup-python@v3 |
| 345 | + with: |
| 346 | + python-version: "3.10" |
26 | 347 |
|
27 |
| - - name: Install dependencies |
28 |
| - run: | |
29 |
| - python -m pip install --upgrade pip |
30 |
| - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 348 | + - name: Install dependencies |
| 349 | + run: | |
| 350 | + python -m pip install --upgrade pip |
| 351 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
31 | 352 |
|
32 |
| - - name: Install dependencies |
33 |
| - run: make prepare |
| 353 | + - name: Download prepare backup |
| 354 | + uses: actions/download-artifact@v4 |
| 355 | + with: |
| 356 | + name: prepare-backup-${{ runner.os }} |
| 357 | + path: ./ |
34 | 358 |
|
35 |
| - - name: Run tests |
36 |
| - run: make fiber_test |
| 359 | + - name: Extract tarball and restore permissions |
| 360 | + run: | |
| 361 | + tar -xzf prepare-backup.tar.gz |
37 | 362 |
|
38 |
| -# - name: Setup upterm session |
39 |
| -# if: always() |
40 |
| -# uses: lhotari/action-upterm@v1 |
| 363 | + - name: Run fiber_test_demo |
| 364 | + run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/send_payment/debug test_cases/fiber/devnet/send_payment/mixed" |
41 | 365 |
|
42 |
| - - name: Publish reports |
43 |
| - if: failure() |
44 |
| - uses: actions/upload-artifact@v4 |
45 |
| - with: |
46 |
| - name: jfoa-build-reports-${{ runner.os }} |
47 |
| - path: ./report |
| 366 | + - name: Publish reports |
| 367 | + if: failure() |
| 368 | + uses: actions/upload-artifact@v4 |
| 369 | + with: |
| 370 | + name: jfoa-fiber_test_send_payment_debug_mixed-reports-${{ runner.os }} |
| 371 | + path: ./report |
0 commit comments