Skip to content

Add code coverage to CI/CD #66

Add code coverage to CI/CD

Add code coverage to CI/CD #66

on: [push]
name: Cargo build and test
jobs:
build_and_test:
name: Build and test Stellar SDK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
# target: x86_64-unknown-linux-musl
# override: true
# components: llvm-tools-preview
# - uses: actions-rs/cargo@v1
# with:
# command: build
# args: --release --all-features
- uses: actions-rs/cargo@v1
name: cargo test
with:
command: test
- name: Download grcov
run: |
mkdir -p "${HOME}/.local/bin"
curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.10/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - -C "${HOME}/.local/bin"
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Run xtask coverage
uses: actions-rs/cargo@v1
with:
command: xtask
args: coverage