Skip to content

Commit

Permalink
Share top level workspace
Browse files Browse the repository at this point in the history
Sharing a workspace makes it easier to ensure crate compatibility.
  • Loading branch information
DanGould committed Nov 29, 2023
1 parent a51acd6 commit 609c0f5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 33 deletions.
37 changes: 5 additions & 32 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ on: [push, pull_request]

jobs:

test-lib:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: payjoin
strategy:
fail-fast: false
matrix:
Expand All @@ -17,31 +14,6 @@ jobs:
- stable
- nightly

steps:
- uses: actions/checkout@v2
- uses: Swatinem/[email protected]
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Fixes for MSRV
if: matrix.rust == '1.63.0'
run: |
cargo update
cargo update -p regex --precise 1.9.6
- name: test
run: cargo test --verbose --all-features --lib

test-payjoin-cli:
runs-on: ubuntu-latest
defaults:
run:
working-directory: payjoin-cli
strategy:
fail-fast: false
matrix:
rust: [1.63.0, stable, nightly]

steps:
- uses: actions/checkout@v2
- uses: Swatinem/[email protected]
Expand All @@ -55,9 +27,10 @@ jobs:
cargo update
cargo update -p regex --precise 1.9.6
cargo update -p [email protected] --precise 0.3.20
- name: build payjoin cli example
run: |
cargo test --verbose --features=danger-local-https
- name: test payjoin lib
run: cargo test --package payjoin --verbose --all-features --lib
- name: test payjoin-cli bin
run: cargo test --package payjoin-cli --verbose --features=danger-local-https

fmt:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions payjoin-cli/Cargo.lock → Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[workspace]
members = ["payjoin", "payjoin-cli"]
resolver = "2"
2 changes: 1 addition & 1 deletion payjoin-cli/tests/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mod e2e {
let pj_host = find_free_port();
let pj_endpoint = format!("https://localhost:{}", pj_host);

let payjoin_cli = "target/debug/payjoin-cli";
let payjoin_cli = env!("CARGO_BIN_EXE_payjoin-cli");

let mut cli_receiver = Command::new(payjoin_cli)
.arg("--rpchost")
Expand Down

0 comments on commit 609c0f5

Please sign in to comment.