Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,24 @@ jobs:
toolchain: stable
components: clippy, rustfmt

- name: Install Simplex
run: |
export SIMPLEX_DIR="$HOME/.simplex"
curl -L https://raw.githubusercontent.com/BlockstreamResearch/smplx/master/simplexup/install | bash
echo "$SIMPLEX_DIR/bin" >> "$GITHUB_PATH"
"$SIMPLEX_DIR/bin/simplexup" --install v0.0.4 --platform linux --arch amd64

- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Generate contract artifacts
working-directory: crates/contracts
run: simplex build

- name: Format check
run: cargo fmt --all --check

- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings


run: cargo clippy --workspace --all-targets --all-features -- -D warnings -D clippy::all -D clippy::pedantic -D clippy::nursery -D clippy::cargo -A clippy::multiple_crate_versions
34 changes: 25 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
toolchain: ["1.90.0", "stable"]
toolchain: ["1.91.0", "stable"]

steps:
- name: Checkout
Expand All @@ -28,22 +28,27 @@ jobs:
with:
toolchain: ${{ matrix.toolchain }}

- name: Install Simplex
run: |
export SIMPLEX_DIR="$HOME/.simplex"
curl -L https://raw.githubusercontent.com/BlockstreamResearch/smplx/master/simplexup/install | bash
echo "$SIMPLEX_DIR/bin" >> "$GITHUB_PATH"
"$SIMPLEX_DIR/bin/simplexup" --install v0.0.4 --platform linux --arch amd64

- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Generate contract artifacts
working-directory: crates/contracts
run: simplex build

- name: Build
run: cargo build --workspace --all-features --verbose

- name: Targeted wallet-abi library tests
run: cargo test -p wallet-abi --lib --verbose

- name: Targeted CLI unit tests
run: cargo test -p cli --lib --verbose

- name: Test (excluding regtest-dependent contracts)
run: cargo test --workspace --all-features --exclude contracts --no-fail-fast --verbose
run: cargo test --workspace --all-features --lib --no-fail-fast --verbose

contracts-regtest:
name: Contracts regtest tests
Expand All @@ -58,11 +63,22 @@ jobs:
with:
toolchain: stable

- name: Install Simplex
run: |
export SIMPLEX_DIR="$HOME/.simplex"
curl -L https://raw.githubusercontent.com/BlockstreamResearch/smplx/master/simplexup/install | bash
echo "$SIMPLEX_DIR/bin" >> "$GITHUB_PATH"
"$SIMPLEX_DIR/bin/simplexup" --install v0.0.4 --platform linux --arch amd64

- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Generate contract artifacts
working-directory: crates/contracts
run: simplex build

- name: Setup regtest binaries
run: |
set -euo pipefail
Expand All @@ -89,4 +105,4 @@ jobs:
echo "ELEMENTSD_EXEC=${BIN_DIR}/elements-${ELEMENTSD_VERSION}/bin/elementsd" >> "$GITHUB_ENV"

- name: Test contracts (regtest)
run: cargo test -p contracts --all-features --no-fail-fast --verbose -- --test-threads=1
run: simplex test
Loading
Loading