From ceaceb8ab9ac38059105a3e75f0126525c4044c5 Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Mon, 1 Feb 2021 17:42:59 +0100 Subject: [PATCH 01/12] actions dev --- .github/workflows/rust.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6605bd98e2..a76a5a660a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -106,3 +106,12 @@ jobs: with: name: code-coverage-report path: cobertura.xml + + test-end-to-end: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true \ No newline at end of file From 2822cea462511befa1e2bb99331005e23638fcc4 Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 16:50:03 +0100 Subject: [PATCH 02/12] Removed build step from relayer dockerfile --- .github/workflows/rust.yml | 8 +++++++- ci/relayer.Dockerfile | 37 +++++-------------------------------- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a76a5a660a..ab2e838cb5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -114,4 +114,10 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable - override: true \ No newline at end of file + override: true + - uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace --all-targets --release + - name: Build relayer image + run: docker-compose -f ci/docker-compose.yml build relayer \ No newline at end of file diff --git a/ci/relayer.Dockerfile b/ci/relayer.Dockerfile index fd64375791..81604e0bb2 100644 --- a/ci/relayer.Dockerfile +++ b/ci/relayer.Dockerfile @@ -1,32 +1,3 @@ -##################################################### -#### Build image #### -##################################################### -FROM rust:slim AS build-env - -# Output Rust version -RUN cargo --version - -# Set working dir -WORKDIR /repo - -# Cache dependencies -COPY Cargo.toml . -COPY ./modules/Cargo.toml ./modules -COPY ./relayer/Cargo.toml ./relayer -COPY ./relayer-cli/Cargo.toml ./relayer-cli -COPY ./proto/Cargo.toml ./proto - -RUN cargo fetch - -# Copy project files -COPY . . - -# Update packages -RUN cargo update - -# Build files -RUN cargo build --workspace --all --release - ##################################################### #### Relayer image #### ##################################################### @@ -35,11 +6,13 @@ LABEL maintainer="hello@informal.systems" ARG RELEASE -# Add jq and Python 3 -RUN apt-get update -y && apt-get install python3 jq -y +# Add Python 3 +RUN apt-get update -y && apt-get install python3 -y +RUN echo "$RELEASE" +RUN ls -al # Copy relayer executable -COPY --from=build-env /repo/target/release/hermes /usr/bin/hermes +COPY ./target/release/hermes /usr/bin/hermes # Relayer folder WORKDIR /relayer From 34c7a2f2df7f5a1468696801bfa90da064f170fd Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 16:54:06 +0100 Subject: [PATCH 03/12] Consolidated the workflows --- .github/workflows/e2e.yml | 14 -------------- .github/workflows/rust.yml | 6 +++++- 2 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index 9324fdf611..0000000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: End to End testing -on: [pull_request] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build relayer image - run: docker-compose -f ci/docker-compose.yml build relayer - - name: Start chains and relayer - run: docker-compose -f ci/docker-compose.yml up -d ibc-0 ibc-1 relayer - - name: Run relayer workflow - run: docker exec relayer /bin/sh -c /relayer/e2e.sh diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ab2e838cb5..f731a46d35 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -120,4 +120,8 @@ jobs: command: build args: --workspace --all-targets --release - name: Build relayer image - run: docker-compose -f ci/docker-compose.yml build relayer \ No newline at end of file + run: docker-compose -f ci/docker-compose.yml build relayer + - name: Start chains and relayer + run: docker-compose -f ci/docker-compose.yml up -d ibc-0 ibc-1 relayer + - name: Run relayer workflow + run: docker exec relayer /bin/sh -c /relayer/e2e.sh From 5b8ea7a7bf34c9a06070babf87859a371e806f61 Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 17:33:26 +0100 Subject: [PATCH 04/12] Debugging with Greg --- .github/workflows/rust.yml | 8 +++----- ci/relayer.Dockerfile | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c995ba718c..031f413aee 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -44,10 +44,6 @@ jobs: with: toolchain: stable override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --workspace --all-targets - uses: actions-rs/cargo@v1 with: command: test @@ -91,13 +87,15 @@ jobs: with: toolchain: stable override: true + - run: echo "hello" - uses: actions-rs/cargo@v1 with: command: build args: --workspace --all-targets --release + - run: cp ./target/release/hermes ci/ - name: Build relayer image run: docker-compose -f ci/docker-compose.yml build relayer - name: Start chains and relayer run: docker-compose -f ci/docker-compose.yml up -d ibc-0 ibc-1 relayer - name: Run relayer workflow - run: docker exec relayer /bin/sh -c /relayer/e2e.sh + run: docker exec relayer /bin/sh -c /relayer/e2e.sh \ No newline at end of file diff --git a/ci/relayer.Dockerfile b/ci/relayer.Dockerfile index 81604e0bb2..dee05e6457 100644 --- a/ci/relayer.Dockerfile +++ b/ci/relayer.Dockerfile @@ -12,7 +12,7 @@ RUN apt-get update -y && apt-get install python3 -y RUN echo "$RELEASE" RUN ls -al # Copy relayer executable -COPY ./target/release/hermes /usr/bin/hermes +COPY ./hermes /usr/bin/hermes # Relayer folder WORKDIR /relayer From f1847553e756f599f9c0213812f329221c002133 Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 17:48:24 +0100 Subject: [PATCH 05/12] Removed debugging info --- .github/workflows/rust.yml | 1 - ci/relayer.Dockerfile | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 031f413aee..c5034368b9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -87,7 +87,6 @@ jobs: with: toolchain: stable override: true - - run: echo "hello" - uses: actions-rs/cargo@v1 with: command: build diff --git a/ci/relayer.Dockerfile b/ci/relayer.Dockerfile index dee05e6457..6a81c49b66 100644 --- a/ci/relayer.Dockerfile +++ b/ci/relayer.Dockerfile @@ -9,8 +9,6 @@ ARG RELEASE # Add Python 3 RUN apt-get update -y && apt-get install python3 -y -RUN echo "$RELEASE" -RUN ls -al # Copy relayer executable COPY ./hermes /usr/bin/hermes From 8cabdc6f9afb7ff3736837ea19b1d0b697d353d8 Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 17:58:06 +0100 Subject: [PATCH 06/12] Trying with workdir --- ci/relayer.Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/relayer.Dockerfile b/ci/relayer.Dockerfile index 6a81c49b66..7eca4cc8f8 100644 --- a/ci/relayer.Dockerfile +++ b/ci/relayer.Dockerfile @@ -6,11 +6,13 @@ LABEL maintainer="hello@informal.systems" ARG RELEASE +WORKDIR /repo + # Add Python 3 RUN apt-get update -y && apt-get install python3 -y # Copy relayer executable -COPY ./hermes /usr/bin/hermes +COPY ./target/release/hermes /usr/bin/hermes # Relayer folder WORKDIR /relayer From c155365b04966a01993351202f4e23053e2c45b3 Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 18:33:29 +0100 Subject: [PATCH 07/12] no neeed for --release --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c5034368b9..b9bf72f821 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -90,7 +90,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: build - args: --workspace --all-targets --release + args: --workspace --all-targets - run: cp ./target/release/hermes ci/ - name: Build relayer image run: docker-compose -f ci/docker-compose.yml build relayer From 693ad7422c0a896e73e0c40a3662d530a7d14621 Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 18:50:34 +0100 Subject: [PATCH 08/12] One more time --- .github/workflows/rust.yml | 2 +- ci/relayer.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b9bf72f821..4ad158dccd 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -91,7 +91,7 @@ jobs: with: command: build args: --workspace --all-targets - - run: cp ./target/release/hermes ci/ + - run: cp ./target/debug/hermes . - name: Build relayer image run: docker-compose -f ci/docker-compose.yml build relayer - name: Start chains and relayer diff --git a/ci/relayer.Dockerfile b/ci/relayer.Dockerfile index 7eca4cc8f8..0a4c3deacd 100644 --- a/ci/relayer.Dockerfile +++ b/ci/relayer.Dockerfile @@ -12,7 +12,7 @@ WORKDIR /repo RUN apt-get update -y && apt-get install python3 -y # Copy relayer executable -COPY ./target/release/hermes /usr/bin/hermes +COPY ./hermes /usr/bin/hermes # Relayer folder WORKDIR /relayer From 1c7750c76c0b2dc6ddec7f793a554ea444e9aa57 Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 19:02:04 +0100 Subject: [PATCH 09/12] RM Redundant workdir command --- ci/relayer.Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/relayer.Dockerfile b/ci/relayer.Dockerfile index 0a4c3deacd..6a81c49b66 100644 --- a/ci/relayer.Dockerfile +++ b/ci/relayer.Dockerfile @@ -6,8 +6,6 @@ LABEL maintainer="hello@informal.systems" ARG RELEASE -WORKDIR /repo - # Add Python 3 RUN apt-get update -y && apt-get install python3 -y From cf46b6b7c1a40d5515d33065f3b6e1ac58ba2e5f Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 19:11:27 +0100 Subject: [PATCH 10/12] Switched back to split workflows --- .github/workflows/e2e.yaml | 23 +++++++++++++++++++++++ .github/workflows/rust.yml | 22 +--------------------- 2 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/e2e.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml new file mode 100644 index 0000000000..339a870a91 --- /dev/null +++ b/.github/workflows/e2e.yaml @@ -0,0 +1,23 @@ +name: End to End testing +on: [pull_request] + +jobs: + test-end-to-end: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace --all-targets + - run: cp ./target/debug/hermes . + - name: Build relayer image + run: docker-compose -f ci/docker-compose.yml build relayer + - name: Start chains and relayer + run: docker-compose -f ci/docker-compose.yml up -d ibc-0 ibc-1 relayer + - name: Run relayer workflow + run: docker exec relayer /bin/sh -c /relayer/e2e.sh \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4ad158dccd..5bb85adf0f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -77,24 +77,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: code-coverage-report - path: cobertura.xml - - test-end-to-end: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --workspace --all-targets - - run: cp ./target/debug/hermes . - - name: Build relayer image - run: docker-compose -f ci/docker-compose.yml build relayer - - name: Start chains and relayer - run: docker-compose -f ci/docker-compose.yml up -d ibc-0 ibc-1 relayer - - name: Run relayer workflow - run: docker exec relayer /bin/sh -c /relayer/e2e.sh \ No newline at end of file + path: cobertura.xml \ No newline at end of file From b41811d8ebabc3979ac0eefb8236e95f00d5472d Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 19:21:38 +0100 Subject: [PATCH 11/12] Changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c065dcb6c..49f80ada06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### FEATURES -- Continous Integration (CI) end-to-end (e2e) testing with gaia v4 ([#32],[#602]) +- Continous Integration (CI) end-to-end (e2e) testing with gaia v4 ([#32], [#582], [#602]) - Add support for streamlining releases ([#507]) - [relayer-cli] @@ -82,6 +82,7 @@ [#557]: https://github.com/informalsystems/ibc-rs/issues/557 [#563]: https://github.com/informalsystems/ibc-rs/issues/563 [#568]: https://github.com/informalsystems/ibc-rs/issues/568 +[#582]: https://github.com/informalsystems/ibc-rs/issues/582 [#583]: https://github.com/informalsystems/ibc-rs/issues/583 [#590]: https://github.com/informalsystems/ibc-rs/issues/590 [#593]: https://github.com/informalsystems/ibc-rs/issues/593 From 81af0b0b0418c4a365617e3cbf6006db80a3c831 Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Wed, 3 Feb 2021 19:35:51 +0100 Subject: [PATCH 12/12] Update .github/workflows/e2e.yaml Co-authored-by: Romain Ruetschi --- .github/workflows/e2e.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 339a870a91..be4587f727 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -13,11 +13,11 @@ jobs: - uses: actions-rs/cargo@v1 with: command: build - args: --workspace --all-targets + args: --workspace - run: cp ./target/debug/hermes . - name: Build relayer image run: docker-compose -f ci/docker-compose.yml build relayer - name: Start chains and relayer run: docker-compose -f ci/docker-compose.yml up -d ibc-0 ibc-1 relayer - name: Run relayer workflow - run: docker exec relayer /bin/sh -c /relayer/e2e.sh \ No newline at end of file + run: docker exec relayer /bin/sh -c /relayer/e2e.sh