Skip to content

Commit

Permalink
imp(e2e): removed 'e2e/artifacts' (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
srdtrk authored Aug 14, 2024
1 parent f1dffcc commit 7d23401
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 22 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,32 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
check-latest: true
cache-dependency-path: "e2e/interchaintestv8/go.sum"

- name: "Install Bun"
uses: "oven-sh/setup-bun@v2"

- name: "Install the Node.js dependencies"
run: bun install
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install SP1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version
- name: Install operator
uses: actions-rs/cargo@v1
with:
command: install
args: --git https://github.com/cosmos/sp1-ics07-tendermint sp1-ics07-tendermint-operator --bin operator --locked

- name: Run Tests
env:
Expand Down
Binary file removed e2e/artifacts/darwin-aarch64/operator
Binary file not shown.
7 changes: 0 additions & 7 deletions e2e/artifacts/genesis.json

This file was deleted.

Binary file removed e2e/artifacts/linux-x86_64/operator
Binary file not shown.
6 changes: 5 additions & 1 deletion e2e/interchaintestv8/ibc_eureka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ func (s *IbcEurekaTestSuite) SetupSuite(ctx context.Context) {
s.Require().NoError(operator.RunGenesis(
"--trust-level", testvalues.DefaultTrustLevel.String(),
"--trusting-period", strconv.Itoa(testvalues.DefaultTrustPeriod),
"-o", "e2e/artifacts/genesis.json",
"-o", "e2e/genesis.json",
))

s.T().Cleanup(func() {
_ = os.Remove("e2e/genesis.json")
})

var (
stdout []byte
stderr []byte
Expand Down
10 changes: 1 addition & 9 deletions e2e/interchaintestv8/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"errors"
"os/exec"
"runtime"
"strconv"
"strings"

Expand All @@ -23,14 +22,7 @@ type membershipFixture struct {
}

func BinaryPath() string {
switch runtime.GOOS {
case "darwin":
return "e2e/artifacts/darwin-aarch64/operator"
case "linux":
return "e2e/artifacts/linux-x86_64/operator"
default:
panic("unsupported OS")
}
return "operator"
}

// RunGenesis is a function that runs the genesis script to generate genesis.json
Expand Down
2 changes: 1 addition & 1 deletion script/E2ETestDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ contract E2ETestDeploy is Script {

function loadGenesis(string memory fileName) public view returns (SP1ICS07TendermintGenesisJson memory) {
string memory root = vm.projectRoot();
string memory path = string.concat(root, "/e2e/artifacts/", fileName);
string memory path = string.concat(root, "/e2e/", fileName);
string memory json = vm.readFile(path);
bytes memory trustedClientState = json.readBytes(".trustedClientState");
bytes memory trustedConsensusState = json.readBytes(".trustedConsensusState");
Expand Down
2 changes: 1 addition & 1 deletion script/MockE2ETestDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ contract MockE2ETestDeploy is Script {

function loadGenesis(string memory fileName) public view returns (SP1ICS07TendermintGenesisJson memory) {
string memory root = vm.projectRoot();
string memory path = string.concat(root, "/e2e/artifacts/", fileName);
string memory path = string.concat(root, "/e2e/", fileName);
string memory json = vm.readFile(path);
bytes memory trustedClientState = json.readBytes(".trustedClientState");
bytes memory trustedConsensusState = json.readBytes(".trustedConsensusState");
Expand Down

0 comments on commit 7d23401

Please sign in to comment.