Merge pull request #97 from lightningdevkit/0fc #313
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| pull_request: | |
| branches: [ main, master ] | |
| push: | |
| branches: [ main, master ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| RUST_BACKTRACE: 1 | |
| RUST_LOG: orange_sdk=debug,graduated_rebalancer=debug,ldk_node=info,integration_tests=info,test_utils=info | |
| jobs: | |
| rust_tests: | |
| name: Rust Checks | |
| runs-on: self-hosted | |
| timeout-minutes: 120 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| version: "30.2" | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: Swatinem/rust-cache@v2.7.8 | |
| - name: Cache package-enabled Esplora | |
| id: cache-esplora | |
| uses: actions/cache@v4 | |
| with: | |
| path: bin/electrs-${{ runner.os }}-${{ runner.arch }} | |
| key: electrs-submit-package-8c06d801-${{ runner.os }}-${{ runner.arch }} | |
| - name: Build package-enabled Esplora | |
| if: steps.cache-esplora.outputs.cache-hit != 'true' | |
| run: | | |
| ./scripts/build_package_esplora.sh "bin/electrs-${{ runner.os }}-${{ runner.arch }}" | |
| - name: Configure package-enabled Esplora | |
| run: echo "ELECTRS_EXE=$(pwd)/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV" | |
| - name: Check formatting | |
| run: cargo fmt --check | |
| - name: Check clippy | |
| run: ./ci/check-lint.sh | |
| - name: Check examples | |
| run: cargo check -p orange-cli | |
| - name: Run tests | |
| run: cargo test --features _test-utils -- --test-threads=2 --nocapture | |
| cashu_tests: | |
| name: Cashu Tests | |
| runs-on: self-hosted | |
| timeout-minutes: 120 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| version: "30.2" | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: Swatinem/rust-cache@v2.7.8 | |
| - name: Cache package-enabled Esplora | |
| id: cache-esplora | |
| uses: actions/cache@v4 | |
| with: | |
| path: bin/electrs-${{ runner.os }}-${{ runner.arch }} | |
| key: electrs-submit-package-8c06d801-${{ runner.os }}-${{ runner.arch }} | |
| - name: Build package-enabled Esplora | |
| if: steps.cache-esplora.outputs.cache-hit != 'true' | |
| run: | | |
| ./scripts/build_package_esplora.sh "bin/electrs-${{ runner.os }}-${{ runner.arch }}" | |
| - name: Configure package-enabled Esplora | |
| run: echo "ELECTRS_EXE=$(pwd)/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV" | |
| - name: Run cashu tests | |
| run: cargo test --features _cashu-tests -- --test-threads=2 --nocapture |