-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This pull request adds a `flake.nix` file to the E2E tests. This nix flake only provisions the Ruby environment, but neither `cardano-wallet` nor `cardano-node`, as these executables are the ones that are subject to testing. ### Issue Number ADP-3368
- Loading branch information
Showing
3 changed files
with
114 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
description = '' | ||
Shell for the Ruby E2E tests. | ||
This shell does *not* include `cardano-wallet` and `cardano-node`, | ||
only the Ruby environment. | ||
''; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs"; | ||
flake-utils.url = "github:hamishmack/flake-utils/hkm/nested-hydraJobs"; | ||
}; | ||
|
||
outputs = inputs: | ||
let | ||
supportedSystems = [ | ||
"x86_64-linux" | ||
"x86_64-darwin" | ||
# The `blake2b` Ruby gem does not compile on aarch64-* | ||
# "aarch64-linux" | ||
# "aarch64-darwin" | ||
]; in | ||
inputs.flake-utils.lib.eachSystem supportedSystems (system: | ||
let | ||
# Imports | ||
pkgs = inputs.nixpkgs.legacyPackages.${system}; | ||
|
||
# To update gemset.nix, run: | ||
# nix develop -c bundix | ||
gems = pkgs.bundlerEnv { | ||
name = "gems-cardano-wallet-e2e"; | ||
gemdir = ./.; | ||
ruby = pkgs.ruby_3_1; | ||
}; | ||
in { | ||
packages = { }; | ||
|
||
devShells.default = pkgs.mkShell { | ||
buildInputs = [ | ||
pkgs.curl | ||
pkgs.jq | ||
gems | ||
gems.wrappedRuby | ||
pkgs.bundix | ||
pkgs.screen | ||
]; | ||
shellHook = '' | ||
# use this hook to set up additional environment variables | ||
''; | ||
}; | ||
} | ||
); | ||
} |