Use custom tarpaulin Github action with taskwarrior
This commit is contained in:
22
.github/actions/cargo-tarpaulin-action/action.yml
vendored
Normal file
22
.github/actions/cargo-tarpaulin-action/action.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: 'cargo tarpaulin'
|
||||
description: 'Gather Rust code coverage information with Tarpaulin'
|
||||
inputs:
|
||||
version:
|
||||
description: 'The version of cargo-tarpaulin to install'
|
||||
required: true
|
||||
default: '0.19.0'
|
||||
|
||||
args:
|
||||
required: false
|
||||
description: 'Extra command line arguments passed to cargo-tarpaulin'
|
||||
|
||||
out-type:
|
||||
description: 'Output format of coverage report [possible values: Json, Toml, Stdout, Xml, Html, Lcov]'
|
||||
required: false
|
||||
default: 'Xml'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- run: ${{ github.action_path }}/cargo-tarpaulin.sh ${{ inputs.out-type }} ${{ inputs.version }} ${{ inputs.args }}
|
||||
shell: bash
|
||||
15
.github/actions/cargo-tarpaulin-action/cargo-tarpaulin.sh
vendored
Executable file
15
.github/actions/cargo-tarpaulin-action/cargo-tarpaulin.sh
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y --no-install-recommends openssl taskwarrior
|
||||
|
||||
out_type="$1"
|
||||
version="$2"
|
||||
args="$3"
|
||||
tar_file="cargo-tarpaulin-${version}-travis.tar.gz"
|
||||
|
||||
wget "https://github.com/xd009642/tarpaulin/releases/download/${version}/${tar_file}"
|
||||
tar zxvf "$tar_file"
|
||||
chmod +x cargo-tarpaulin
|
||||
|
||||
exec env RUST_LOG=debug ./cargo-tarpaulin tarpaulin --ignore-tests -o "$out_type" $args
|
||||
Reference in New Issue
Block a user