diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f7027218cc3703baafa52abe04269137636ff5ba..5d415a4cf7c5590bbe128d343a549e40feb3a7bd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,3 +48,49 @@ jobs: run: cargo test env: CARGO_INCREMENTAL: 0 + + coverage: + name: Coverage + runs-on: ubuntu-latest + permissions: + actions: read + checks: write + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/.crates.toml + ~/.cargo/.crates2.json + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }} + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Install Bevy dependencies + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libxcb-shape0-dev libxcb-xfixes0-dev + if: runner.os == 'linux' + - name: Install graphic drivers + run: | + sudo apt-get update -y -qq + sudo add-apt-repository ppa:oibaf/graphics-drivers -y + sudo apt-get update + sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers + if: runner.os == 'linux' + - name: Install cargo-tarpaulin + run: | + RUST_BACKTRACE=1 cargo install --version 0.19.1 cargo-tarpaulin + - name: Generate code coverage + run: | + RUST_BACKTRACE=1 cargo tarpaulin --verbose --timeout 120 --out Lcov --workspace + ls -la + - name: Upload code coverage + uses: coverallsapp/github-action@master + with: + path-to-lcov: 'lcov.info' + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 335ba82bf4993f0f840b6812af80d62f7980bc52..95a080988f569779002d785e64f24011ccf68f70 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [](https://docs.rs/bevy_tweening) [](https://crates.io/crates/bevy_tweening) [](https://github.com/djeedai/bevy_tweening/actions/workflows/ci.yaml) +[](https://coveralls.io/github/djeedai/bevy_tweening?branch=main) [](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking) Tweening animation plugin for the Bevy game engine.