Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Integration tests setup #1196

Merged
merged 19 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from 15 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
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,28 @@ jobs:
make test-integration
if: env.GIT_DIFF

integration_tests:
crypto-facs marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
- uses: cachix/cachix-action@v10
with:
name: ethermint
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: Run integration tests
run: make run-integration-tests
if: env.GIT_DIFF
- name: 'Tar debug files'
if: failure()
run: tar cfz debug_files.tar.gz -C /tmp/pytest-of-runner .
- uses: actions/upload-artifact@v2
if: failure()
with:
name: debug-files
path: debug_files.tar.gz
if-no-files-found: ignore

test-sim-nondeterminism:
runs-on: ubuntu-latest
timeout-minutes: 25
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ dependency-graph.png

# Node.js
tests/**/node_modules/*
tests-solidity/**/node_modules/*
tests-solidity/**/node_modules/*

# Nix
/result
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ test-rpc:
test-integration:
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
./scripts/integration-test-all.sh -t "integration" -q 1 -z 1 -s 2 -m "integration" -r "true"

run-integration-tests:
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
@nix-shell ./tests/integration_tests/shell.nix --run ./scripts/run-integration-tests.sh

.PHONY: run-integration-tests


test-rpc-pending:
./scripts/integration-test-all.sh -t "pending" -q 1 -z 1 -s 2 -m "pending" -r "true"

Expand Down
47 changes: 47 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{ lib
, buildGoApplication
, nix-gitignore
, rev ? "dirty"
}:
let
version = "v0.17.1";
pname = "ethermintd";
tags = [ "ledger" "netgo" ];
ldflags = lib.concatStringsSep "\n" ([
"-X github.com/cosmos/cosmos-sdk/version.Name=ethermint"
"-X github.com/cosmos/cosmos-sdk/version.AppName=${pname}"
"-X github.com/cosmos/cosmos-sdk/version.Version=${version}"
"-X github.com/cosmos/cosmos-sdk/version.BuildTags=${lib.concatStringsSep "," tags}"
"-X github.com/cosmos/cosmos-sdk/version.Commit=${rev}"
]);
in
buildGoApplication rec {
inherit pname version tags ldflags;
src = (nix-gitignore.gitignoreSourcePure [
"../*" # ignore all, then add whitelists
"!../x/"
"!../app/"
"!../cmd/"
"!../client/"
"!../server/"
"!../crypto/"
"!../rpc/"
"!../types/"
"!../encoding/"
"!../go.mod"
"!../go.sum"
"!../gomod2nix.toml"
] ./.);
modules = ./gomod2nix.toml;
doCheck = false;
pwd = src; # needed to support replace
subPackages = [ "cmd/ethermintd" ];
CGO_ENABLED = "1";

meta = with lib; {
description = "Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on top of Tendermint Core consensus engine.";
homepage = "https://github.com/evmos/ethermint";
license = licenses.asl20;
mainProgram = "ethermintd";
};
}
Loading