Skip to content

Commit

Permalink
flake-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Jan 4, 2024
1 parent a2194a8 commit 6c6520c
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
8 changes: 4 additions & 4 deletions integration_tests/poetry.lock

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

2 changes: 1 addition & 1 deletion integration_tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pytest-github-actions-annotate-failures = "^0.1.7"
protobuf = "^3.20.2"
pyyaml = "^6.0.1"
python-dateutil = "^2.8.1"
pystarport = { git = "https://github.com/crypto-com/pystarport.git", branch = "main", rev = "1c3515549650497ff12fec4d2060a7e9cbaedf33" }
pystarport = { git = "https://github.com/mmsqe/pystarport.git", branch = "main", rev = "e4b75196ccd7aba037118a9407caaede2e72aac4" }
chainlibpy = "^2.2.0"

# manually upgrade to make hatchling build success in poetry2nix
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def assert_commission(adr, expected):
"creator": creator,
}, ev

target_height = cluster.block_height() + 30
target_height = cluster.block_height() + 15
upgrade(cluster, "v4.2.0", target_height, cosmos_sdk_47=False)

cli = cluster.cosmos_cli()
Expand Down Expand Up @@ -414,8 +414,8 @@ def assert_commission(adr, expected):
assert_commission(validator1_operator_address, min_commission_rate)
assert_commission(validator2_operator_address, default_rate)

target_height = cluster.block_height() + 30
# upgrade(cluster, "sdk47-upgrade", target_height, cosmos_sdk_47=False)
target_height = cluster.block_height() + 15
upgrade(cluster, "sdk47-upgrade", target_height, cosmos_sdk_47=False)


def test_cancel_upgrade(cluster):
Expand Down
9 changes: 8 additions & 1 deletion integration_tests/upgrade-test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ let
released = (import (builtins.fetchTarball "https://github.com/crypto-org-chain/chain-main/archive/v1.1.0.tar.gz") { }).chain-maind;
released2 = (import (builtins.fetchTarball "https://github.com/crypto-org-chain/chain-main/archive/v2.0.1.tar.gz") { }).chain-maind;
released3 = (import (builtins.fetchTarball "https://github.com/crypto-org-chain/chain-main/archive/v3.3.4.tar.gz") { }).chain-maind;
released4 = (import (builtins.fetchTarball "https://github.com/crypto-org-chain/chain-main/archive/v4.0.0-alpha3-croeseid.tar.gz") { }).chain-maind;
fetchFlake = repo: rev: (pkgs.flake-compat {
src = {
outPath = builtins.fetchTarball "https://github.com/${repo}/archive/${rev}.tar.gz";
inherit rev;
shortRev = builtins.substring 0 7 rev;
};
}).defaultNix;
released4 = (fetchFlake "crypto-org-chain/chain-main" "b3226f06fd2a236f9957304c4d83b0ea06ed2604").default;
current = pkgs.callPackage ../. { };
in
pkgs.linkFarm "upgrade-test-package" [
Expand Down
1 change: 1 addition & 0 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sources.nixpkgs {
overlays = [
(_: pkgs: {
flake-compat = import sources.flake-compat;
cosmovisor = pkgs.buildGoModule rec {
name = "cosmovisor";
src = sources.cosmos-sdk + "/cosmovisor";
Expand Down
12 changes: 12 additions & 0 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,17 @@
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/90aa73fc8e1550b16d1ebdc436e48d9951f7989b.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"flake-compat": {
"branch": "master",
"description": null,
"homepage": null,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"sha256": "1qc703yg0babixi6wshn5wm2kgl5y1drcswgszh4xxzbrwkk9sv7",
"type": "tarball",
"url": "https://github.com/edolstra/flake-compat/archive/b4a34015c698c7793d592d66adbab377907a2be8.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

0 comments on commit 6c6520c

Please sign in to comment.