Skip to content

Commit

Permalink
ci: rewrite integration testing
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Feb 13, 2024
1 parent d4cb15c commit 91ee08e
Show file tree
Hide file tree
Showing 12 changed files with 380 additions and 202 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ members = [
"plugin_macros",
"conf",
"testing",
"tests",
]
resolver = "2"

3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ fmt:
$(CC) fmt --all

check:
$(CC) test --all
$(CC) test
cd tests; $(CC) test

example:
$(CC) build --example foo_plugin
Expand Down
129 changes: 129 additions & 0 deletions flake.lock

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

60 changes: 60 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
description = "A simple core lightning plugin that simplifies the Splice operation";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
};

outputs = { self, nixpkgs, flake-utils, rust-overlay, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlay ];
};

clightning = pkgs.clightning.overrideAttrs (oldAttrs: {
version = "master-abfe";
src = pkgs.fetchgit {
url = "https://github.com/ElementsProject/lightning";
rev = "abfe55e2147ad6ff8d0a155cd49c90a6a659a164";
sha256 = "sha256-UDkrlss4ufd70zYWf6IESiJQ/yo9J7BSdVH5UKrIBbQ=";
fetchSubmodules = true;
};
configureFlags = [ "--disable-rust" "--disable-valgrind" ];
});
in {
packages = {
default = pkgs.gnumake;
};
formatter = pkgs.nixpkgs-fmt;

devShell = pkgs.mkShell {
buildInputs = with pkgs; [
# build dependencies
libcap
gcc
pkg-config
git

gnumake

rustc
cargo

# integration test dependencies
clightning
bitcoind
];

shellHook = ''
export HOST_CC=gcc
export PWD=$(pwd)
echo $(pwd)
'';
};
}
);
}
3 changes: 0 additions & 3 deletions plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@ serde_json = "1.0"
clightningrpc-common = { version = "0.3.0-beta.4" }
log = { version = "0.4.17", optional = true }

[dev-dependencies]
rstest = "0.10.0"

[features]
log = ["dep:log"]
25 changes: 0 additions & 25 deletions plugin/tests/plugin_integration_test.rs

This file was deleted.

23 changes: 0 additions & 23 deletions plugin_macros/tests/plugin_integration_test.rs

This file was deleted.

Loading

0 comments on commit 91ee08e

Please sign in to comment.