|
86 | 86 | run: | |
87 | 87 | RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test --features uniffi |
88 | 88 |
|
| 89 | + stress-test: |
| 90 | + runs-on: ubuntu-latest |
| 91 | + steps: |
| 92 | + - name: Checkout source code |
| 93 | + uses: actions/checkout@v3 |
| 94 | + - name: Install Rust stable toolchain |
| 95 | + run: | |
| 96 | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable |
| 97 | + - name: Enable caching for bitcoind |
| 98 | + id: cache-bitcoind |
| 99 | + uses: actions/cache@v4 |
| 100 | + with: |
| 101 | + path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }} |
| 102 | + key: bitcoind-${{ runner.os }}-${{ runner.arch }} |
| 103 | + - name: Enable caching for electrs |
| 104 | + id: cache-electrs |
| 105 | + uses: actions/cache@v4 |
| 106 | + with: |
| 107 | + path: bin/electrs-${{ runner.os }}-${{ runner.arch }} |
| 108 | + key: electrs-${{ runner.os }}-${{ runner.arch }} |
| 109 | + - name: Download bitcoind/electrs |
| 110 | + if: "steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true'" |
| 111 | + run: | |
| 112 | + source ./scripts/download_bitcoind_electrs.sh |
| 113 | + mkdir bin |
| 114 | + mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }} |
| 115 | + mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }} |
| 116 | + - name: Set bitcoind/electrs environment variables |
| 117 | + run: | |
| 118 | + echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV" |
| 119 | + echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV" |
| 120 | + - name: Build integration tests |
| 121 | + run: RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test --test integration_tests_rust --no-run |
| 122 | + - name: Stress-test integration tests (10 iterations) |
| 123 | + run: | |
| 124 | + for i in $(seq 1 10); do |
| 125 | + echo "=== Iteration $i ===" |
| 126 | + RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test --test integration_tests_rust -- --nocapture 2>&1 || { echo "FAILED on iteration $i"; exit 1; } |
| 127 | + done |
| 128 | +
|
89 | 129 | doc: |
90 | 130 | name: Documentation |
91 | 131 | runs-on: ubuntu-latest |
|
0 commit comments