Skip to content

Commit

Permalink
43: codecov access token (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
jac18281828 authored Jan 25, 2024
1 parent a2a0cf4 commit 2b2bf95
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 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
31 changes: 16 additions & 15 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: Coverage
on: [pull_request, push]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: rustup toolchain install nightly --component llvm-tools-preview
- 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: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
files: lcov.info
fail_ci_if_error: true
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: rustup toolchain install nightly --component llvm-tools-preview
- 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: 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
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ 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

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

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

![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.

[![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 2b2bf95

Please sign in to comment.