Skip to content

Commit

Permalink
Merge branch 'main' of github.com:xmtp/xps-gateway into insipx/revoke…
Browse files Browse the repository at this point in the history
…-installation
  • Loading branch information
insipx committed Jan 26, 2024
2 parents 4fc2bf5 + ce75da2 commit a0f30f6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
push: false
build-args: |
VERSION=latest
CARGO_INCREMENTAL=0
CARGO_INCREMENTAL=0
7 changes: 1 addition & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,13 @@ jobs:
- uses: actions/checkout@v2
- name: Install Rust
run: rustup toolchain install nightly --component llvm-tools-preview
- name: Install anvil
uses: baptiste0928/cargo-install@v2
with:
crate: anvil
git: https://github.com/foundry-rs/foundry
commit: nightly
- name: Install cargo-llvm-cov
run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
- name: Generate code coverage
run: RUST_LOG=xps_gateway=info,registry=info,inbox=info,messaging=info,gateway_types=info cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM ghcr.io/xmtp/rust:latest
ARG CARGO_INCREMENTAL

USER xmtp
ENV USER=xmtp

RUN sudo apt update && sudo apt install -y pkg-config openssl libssl-dev

Expand All @@ -11,17 +12,18 @@ ARG PROJECT=xps-gateway
WORKDIR /workspaces/${PROJECT}
COPY --chown=xmtp:xmtp . .

ENV PATH=~xmtp/.cargo/bin:$PATH
ENV PATH=~${USER}/.cargo/bin:$PATH
ENV USER=xmtp

ENV CARGO_INCREMENTAL=${CARGO_INCREMENTAL:-1}
RUN cargo check
RUN cargo fmt --check
RUN cargo clippy --all-features --no-deps -- -D warnings
RUN cargo test
RUN cargo build --release
RUN CARGO_TARGET_DIR=/workspaces/${PROJECT}/target cargo install --path xps-gateway --bin=xps_gateway
RUN valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ${HOME}/.cargo/bin/xps_gateway --help
RUN cargo test --workspace --all-features
RUN CARGO_TARGET_DIR=/workspaces/${PROJECT}/target cargo install --path xps-gateway --bin=xps_gateway --root=~${USER}/.cargo/
RUN valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ~${USER}/.cargo/bin/xps_gateway --help

CMD RUST_LOG=info cargo run -- --host 0.0.0.0 --port 8080

LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="rustdev" \
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

![XPS](xps.png)

This *postal service* gateway implements the XMTP transport for registration, inbox and conversations.
This _postal service_ gateway implements the XMTP transport for registration, inbox and conversations.

[![Test](https://github.com/xmtp/xps-gateway/actions/workflows/ci-image.yml/badge.svg)](https://github.com/xmtp/xps-gateway/actions/workflows/ci-image.yml)
[![codecov](https://codecov.io/gh/xmtp/xps-gateway/graph/badge.svg?token=HXZBPB9GIN)](https://codecov.io/gh/xmtp/xps-gateway)

## Quick Start (Development)

- [READ THE DOCS](https://xmtp.github.io/xps-gateway)
- [CONTRIBUTING](CONTRIBUTING.md)
- [READ THE DOCS](https://xmtp.github.io/xps-gateway)
- [CONTRIBUTING](CONTRIBUTING.md)

### Dev Containers Development

Expand Down

0 comments on commit a0f30f6

Please sign in to comment.