Skip to content

Commit d5c5e6f

Browse files
committed
Added: Additional Tarpaulin Args parameter.
1 parent be9d949 commit d5c5e6f

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

README.MD

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,30 @@ To use this action in your GitHub workflow, add the following step:
4848
no-default-features: false
4949
use-cross: false
5050
additional-test-args: '--ignored --test-threads=1'
51+
additional-tarpaulin-args: '--exclude-files "*/tests/*"'
5152
```
5253
5354
## Inputs
5455
55-
| Input | Description | Required | Default |
56-
| ------------------------ | -------------------------------------------------------------------------------------------------- | -------- | -------------------- |
57-
| `rust-project-path` | Path to the Rust project | No | `'.'` |
58-
| `rust-toolchain` | Rust toolchain to use for building and testing (e.g., stable, nightly, 1.75.0, nightly-2024-02-08) | No | `'stable'` |
59-
| `target` | The target platform for the Rust compiler | No | `''` |
60-
| `install-rust-toolchain` | Whether to install the specified Rust toolchain | No | `true` |
61-
| `setup-rust-cache` | Whether to set up Rust caching | No | `true` |
62-
| `use-tarpaulin` | Whether to use Tarpaulin for code coverage. If false, only runs tests. | No | `true` |
63-
| `use-binstall` | Use `cargo-binstall` for installing tarpaulin. Else uses cargo install. | No | `true` |
64-
| `install-binstall` | Installs `cargo-binstall`. If false, assumes it is already available. | No | `true` |
65-
| `upload-coverage` | Whether to upload coverage to Codecov (only when using `cargo` and Tarpaulin) | No | `true` |
66-
| `codecov-token` | Codecov token for uploading coverage | No | N/A |
67-
| `codecov-flags` | Flags to pass to Codecov | No | `'unittests'` |
68-
| `codecov-name` | Custom defined name for the upload | No | `'codecov-umbrella'` |
69-
| `features` | Space-separated list of features to enable during testing | No | `''` |
70-
| `no-default-features` | Disable default features during testing | No | `false` |
71-
| `use-cross` | Use cross-rs for testing. If false, use cargo. | No | `false` |
72-
| `additional-test-args` | Additional arguments to pass to the cargo test command | No | `''` |
56+
| Input | Description | Required | Default |
57+
| --------------------------- | -------------------------------------------------------------------------------------------------- | -------- | -------------------- |
58+
| `rust-project-path` | Path to the Rust project | No | `'.'` |
59+
| `rust-toolchain` | Rust toolchain to use for building and testing (e.g., stable, nightly, 1.75.0, nightly-2024-02-08) | No | `'stable'` |
60+
| `target` | The target platform for the Rust compiler | No | `''` |
61+
| `install-rust-toolchain` | Whether to install the specified Rust toolchain | No | `true` |
62+
| `setup-rust-cache` | Whether to set up Rust caching | No | `true` |
63+
| `use-tarpaulin` | Whether to use Tarpaulin for code coverage. If false, only runs tests. | No | `true` |
64+
| `use-binstall` | Use `cargo-binstall` for installing tarpaulin. Else uses cargo install. | No | `true` |
65+
| `install-binstall` | Installs `cargo-binstall`. If false, assumes it is already available. | No | `true` |
66+
| `upload-coverage` | Whether to upload coverage to Codecov (only when using `cargo` and Tarpaulin) | No | `true` |
67+
| `codecov-token` | Codecov token for uploading coverage | No | N/A |
68+
| `codecov-flags` | Flags to pass to Codecov | No | `'unittests'` |
69+
| `codecov-name` | Custom defined name for the upload | No | `'codecov-umbrella'` |
70+
| `features` | Space-separated list of features to enable during testing | No | `''` |
71+
| `no-default-features` | Disable default features during testing | No | `false` |
72+
| `use-cross` | Use cross-rs for testing. If false, use cargo. | No | `false` |
73+
| `additional-test-args` | Additional arguments to pass to the cargo test command | No | `''` |
74+
| `additional-tarpaulin-args` | Additional arguments to pass to the cargo tarpaulin command | No | `''` |
7375

7476
## Example Workflow
7577

action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ inputs:
6868
description: 'Additional arguments to pass to the cargo test command'
6969
required: false
7070
default: ''
71+
additional-tarpaulin-args:
72+
description: 'Additional arguments to pass to the cargo tarpaulin command'
73+
required: false
74+
default: ''
7175

7276
runs:
7377
using: 'composite'
@@ -153,7 +157,8 @@ runs:
153157
${{ inputs.no-default-features == 'true' && '--no-default-features' || '' }} \
154158
${{ inputs.target != '' && format('--target "{0}"', inputs.target) || '' }} \
155159
--skip-clean \
156-
${{ inputs.additional-test-args }}
160+
${{ inputs.additional-test-args }} \
161+
${{ inputs.additional-tarpaulin-args }}
157162
158163
- name: Run Tests with cargo
159164
if: inputs.use-cross == 'false' && inputs.use-tarpaulin == 'false'

0 commit comments

Comments
 (0)