Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed-up CI end-to-end tests #604

Merged
merged 14 commits into from
Feb 3, 2021
11 changes: 10 additions & 1 deletion .github/workflows/e2e.yml → .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ name: End to End testing
on: [pull_request]

jobs:
build:
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
- run: cp ./target/debug/hermes .
- name: Build relayer image
run: docker-compose -f ci/docker-compose.yml build relayer
- name: Start chains and relayer
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ jobs:
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This build was not necessary.

args: --workspace --all-targets
- uses: actions-rs/cargo@v1
with:
command: test
Expand Down Expand Up @@ -81,4 +77,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: cobertura.xml
path: cobertura.xml
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down
35 changes: 3 additions & 32 deletions ci/relayer.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 ####
#####################################################
Expand All @@ -35,11 +6,11 @@ LABEL maintainer="hello@informal.systems"

ARG RELEASE

# Add jq and Python 3
RUN apt-get update -y && apt-get install python3 jq -y
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jq wasn't used in the relayer image.

# Add Python 3
RUN apt-get update -y && apt-get install python3 -y

# Copy relayer executable
COPY --from=build-env /repo/target/release/hermes /usr/bin/hermes
COPY ./hermes /usr/bin/hermes

# Relayer folder
WORKDIR /relayer
Expand Down