From 4ea3201d557be18d10b0e9ee18c50ca0925de616 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Fri, 22 Dec 2023 16:49:20 -0500 Subject: [PATCH] add coverage and extra debian deps --- .github/workflows/coverage.yml | 18 ++++++++++++++++++ Dockerfile | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..c810fde --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,18 @@ +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 diff --git a/Dockerfile b/Dockerfile index 58423b1..c8b28a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM ghcr.io/xmtp/rust:latest 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 . .