Skip to content

Commit

Permalink
Merge branch 'main' into reece/localic-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups authored Oct 30, 2024
2 parents 700a630 + a8a5b2b commit 52e7f32
Show file tree
Hide file tree
Showing 43 changed files with 840 additions and 345 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/e2e-conformance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Conformance End-To-End Tests

on:
pull_request:

# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test-conformance:
name: test-conformance
runs-on: ubuntu-latest
steps:
# Install and setup go
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: checkout interchaintest
uses: actions/checkout@v4

# cleanup environment on self-hosted test runner
- name: clean
run: |-
rm -rf ~/.interchaintest
# run tests
- name: run conformance tests
run: (go test -race -timeout 30m -failfast -v -p 2 ./cmd/interchaintest) || (echo "\n\n*****CHAIN and RELAYER LOGS*****" && cat "$HOME/.interchaintest/logs/interchaintest.log" && exit 1)
33 changes: 33 additions & 0 deletions .github/workflows/e2e-cosmos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Cosmos End-To-End Tests

on:
pull_request:

# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test-cosmos-examples:
name: test-cosmos-examples
runs-on: ubuntu-latest
steps:
# Install and setup go
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: false

- name: checkout interchaintest
uses: actions/checkout@v4

# cleanup environment on self-hosted test runner
- name: clean
run: |-
rm -rf ~/.interchaintest
# run tests
- name: run example cosmos tests
run: go test -race -failfast -timeout 30m -v -p 2 ./examples/cosmos
33 changes: 33 additions & 0 deletions .github/workflows/e2e-ibc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: IBC End-To-End Tests

on:
pull_request:

# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test-ibc-examples:
name: test-ibc-examples
runs-on: ubuntu-latest
steps:
# Install and setup go
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: false

- name: checkout interchaintest
uses: actions/checkout@v4

# cleanup environment on self-hosted test runner
- name: clean
run: |-
rm -rf ~/.interchaintest
# run tests
- name: run example ibc tests
run: go test -race -timeout 30m -failfast -v -p 2 ./examples/ibc
76 changes: 0 additions & 76 deletions .github/workflows/e2e-tests.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [created]

env:
GO_VERSION: 1.21
GO_VERSION: 1.22

jobs:
release-static-binary:
Expand All @@ -31,4 +31,4 @@ jobs:
with:
token: ${{ github.token }}
files: |
local-ic
local-ic
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Before you start contributing, make sure you have the following prerequisites in

- [Go](https://golang.org/dl/)
- [Docker](https://www.docker.com/get-started)
- [VSCode (recommended editor)](https://code.visualstudio.com/)
- [VSCode (recommended editor)](https://code.visualstudio.com/) <!-- markdown-link-check-disable-line -->

To get started, follow these steps:

Expand All @@ -76,7 +76,7 @@ To get started, follow these steps:
git checkout -b name/broad-description-of-feature
```

4. Make your changes and commit them with descriptive commit messages.
4. Make your changes and commit them with descriptive commit messages.

5. Test your changes locally with `go test ./...`, or by running the specific test affecting your feature or fix.

Expand All @@ -86,4 +86,4 @@ To get started, follow these steps:
git push origin name/broad-description-of-feature
```

7. Create a pull request (PR) against the main branch of the interchaintest repository. If the PR is still a work-in-progress, please mark the PR as draft.
7. Create a pull request (PR) against the main branch of the interchaintest repository. If the PR is still a work-in-progress, please mark the PR as draft.
14 changes: 11 additions & 3 deletions Dockerfile.local-interchain
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# docker build . -t local-interchain:local -f Dockerfile.local-interchain
# docker run -it local-interchain:local

FROM golang:1.22.2 as builder
FROM golang:1.22.5 AS builder

# Set destination for COPY
WORKDIR /app
Expand All @@ -21,8 +21,16 @@ RUN cd local-interchain && make build

RUN mv ./bin/local-ic /go/bin

# Reduces the size of the final image from 7GB -> 0.1GB
FROM busybox:1.35.0 as final
# Final stage
FROM debian:bookworm-slim AS final

# Install certificates and required libraries
RUN apt-get update && \
apt-get install -y ca-certificates libc6 && \
update-ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN mkdir -p /usr/local/bin
COPY --from=builder /go/bin/local-ic /usr/local/bin/local-ic

Expand Down
4 changes: 2 additions & 2 deletions chain/cosmos/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (b *Broadcaster) GetFactory(ctx context.Context, user User) (tx.Factory, er
// client.Context.
func (b *Broadcaster) GetClientContext(ctx context.Context, user User) (client.Context, error) {
chain := b.chain
cn := chain.getFullNode()
cn := chain.GetFullNode()

_, ok := b.keyrings[user]
if !ok {
Expand Down Expand Up @@ -160,7 +160,7 @@ func (b *Broadcaster) defaultClientContext(fromUser User, sdkAdd sdk.AccAddress)
// initialize a clean buffer each time
b.buf.Reset()
kr := b.keyrings[fromUser]
cn := b.chain.getFullNode()
cn := b.chain.GetFullNode()
return cn.CliContext().
WithOutput(b.buf).
WithFrom(fromUser.FormattedAddress()).
Expand Down
Loading

0 comments on commit 52e7f32

Please sign in to comment.