Skip to content

Commit

Permalink
Add a nix-shell for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rvl committed Mar 5, 2021
1 parent c673d19 commit 2952e62
Show file tree
Hide file tree
Showing 6 changed files with 199 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ cabal.sandbox.config
.ghc.environment.*
.ghci
*.tix
*.lock
hie.yaml

### Nix ###
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@
/logs/
*binary-dist*

Gemfile.lock

# rspec failure tracking
.rspec_status
40 changes: 40 additions & 0 deletions test/e2e/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
GEM
remote: https://rubygems.org/
specs:
bip_mnemonic (0.0.4)
cardano_wallet (0.3.2)
httparty (~> 0.18.0)
diff-lcs (1.4.4)
httparty (0.18.1)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0225)
multi_xml (0.6.0)
rake (12.3.3)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)

PLATFORMS
ruby

DEPENDENCIES
bip_mnemonic (~> 0.0.4)
cardano_wallet (~> 0.3.2)
rake (~> 12.3)
rspec

BUNDLED WITH
2.1.4
139 changes: 139 additions & 0 deletions test/e2e/gemset.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
bip_mnemonic = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0p9kdsy0i6x4170l83726lrm52c1g62pfzi6ip3nx0ysj6h3qffy";
type = "gem";
};
version = "0.0.4";
};
cardano_wallet = {
dependencies = ["httparty"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0dv12fqv80ids5zhzn23y1wy55qrpwh9wignbllpammkhifqzzl0";
type = "gem";
};
version = "0.3.2";
};
diff-lcs = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0m925b8xc6kbpnif9dldna24q1szg4mk0fvszrki837pfn46afmz";
type = "gem";
};
version = "1.4.4";
};
httparty = {
dependencies = ["mime-types" "multi_xml"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "17gpnbf2a7xkvsy20jig3ljvx8hl5520rqm9pffj2jrliq1yi3w7";
type = "gem";
};
version = "0.18.1";
};
mime-types = {
dependencies = ["mime-types-data"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1zj12l9qk62anvk9bjvandpa6vy4xslil15wl6wlivyf51z773vh";
type = "gem";
};
version = "3.3.1";
};
mime-types-data = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1phcq7z0zpipwd7y4fbqmlaqghv07fjjgrx99mwq3z3n0yvy7fmi";
type = "gem";
};
version = "3.2021.0225";
};
multi_xml = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj";
type = "gem";
};
version = "0.6.0";
};
rake = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1cvaqarr1m84mhc006g3l1vw7sa5qpkcw0138lsxlf769zdllsgp";
type = "gem";
};
version = "12.3.3";
};
rspec = {
dependencies = ["rspec-core" "rspec-expectations" "rspec-mocks"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1dwai7jnwmdmd7ajbi2q0k0lx1dh88knv5wl7c34wjmf94yv8w5q";
type = "gem";
};
version = "3.10.0";
};
rspec-core = {
dependencies = ["rspec-support"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0wwnfhxxvrlxlk1a3yxlb82k2f9lm0yn0598x7lk8fksaz4vv6mc";
type = "gem";
};
version = "3.10.1";
};
rspec-expectations = {
dependencies = ["diff-lcs" "rspec-support"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1sz9bj4ri28adsklnh257pnbq4r5ayziw02qf67wry0kvzazbb17";
type = "gem";
};
version = "3.10.1";
};
rspec-mocks = {
dependencies = ["diff-lcs" "rspec-support"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1d13g6kipqqc9lmwz5b244pdwc97z15vcbnbq6n9rlf32bipdz4k";
type = "gem";
};
version = "3.10.2";
};
rspec-support = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "15j52parvb8cgvl6s0pbxi2ywxrv6x0764g222kz5flz0s4mycbl";
type = "gem";
};
version = "3.10.2";
};
}
3 changes: 3 additions & 0 deletions test/e2e/regenerate-nix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

exec nix-shell --run "bundle lock && bundix"
17 changes: 17 additions & 0 deletions test/e2e/shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ pkgs ? import ../../nix/default.nix {} }:

let
gems = pkgs.bundlerEnv {
name = "gems-cardano-wallet-e2e";
gemdir = ./.;
ruby = pkgs.ruby_2_7;
};
in pkgs.mkShell {
name = "cardano-wallet-e2e";
buildInputs = [
gems
gems.wrappedRuby
pkgs.bundix
pkgs.screen
];
}

0 comments on commit 2952e62

Please sign in to comment.