mirror of
https://github.com/Drop-OSS/interactive-clap.git
synced 2026-01-30 20:55:25 +01:00
the crux of the pr is0c3ce3af6fand912744d436the rest is some refactoring and splitting big chunks of code into smaller and nested modules/functions --- the changes to the logic of derives aren't many and are well summarised by the following list of commits with snapshot differences from the same tests as added to `master` branch in https://github.com/dj8yfo/interactive-clap/commits/backporting_tests_into_master/ branch: * [test_simple_struct](985a46571b/interactive-clap-derive/src/tests/test_simple_struct.rs (L4-L26)) =>eb4b1243f1(fragments reorder) * [test_simple_struct_with_named_arg](985a46571b/interactive-clap-derive/src/tests/test_simple_struct.rs (L29-L49)) =>ddb38910a9(fragments reorder) * [test_doc_comments_propagate](985a46571b/interactive-clap-derive/src/tests/test_simple_struct.rs (L151-L208)) =>6461299b8e(doc comments propagated, `clap(verbatim_doc_comment)` propagated, fragments reordered) * [test_simple_enum](985a46571b/interactive-clap-derive/src/tests/test_simple_enum.rs (L4-L28)) => no change * [test_simple_enum_with_strum_discriminants](985a46571b/interactive-clap-derive/src/tests/test_simple_enum.rs (L31-L61)) => no change * also a bug was found when integrating new functionality: * [new test](985a46571b/interactive-clap-derive/src/tests/test_simple_struct.rs (L51-L75)) * [snapshot change in `InteractiveClap` derive](19b20993c1), test passing * [input change for 2nd stage derive of `ToCliArgs`](29c9aeaf7f) resulted in [test failing](https://github.com/near-cli-rs/interactive-clap/actions/runs/13120732036/job/36605779439) --- second (or 3rd) sub-summary mentions 2 commits382cc33d61,3db17e1e90which made a testing step automatic and not requiring to manually copy-paste a fragment from snapshot generated with first test assertion. No snapshots changed as result of these latter 2 commits. --------- Co-authored-by: dj8yf0μl <noreply@nowhere.org> Co-authored-by: Artur Yurii Korchynskyi <42449190+akorchyn@users.noreply.github.com>
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
name: Tests
|
|
on:
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
tests:
|
|
name: Tests
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
profile: minimal
|
|
- name: Tests
|
|
run: cargo test --workspace
|
|
# there're sometimes warnings, which signal, that the generated doc
|
|
# won't look as expected, when rendered, and sometimes errors, which will prevent doc from being
|
|
# generated at release time altogether.
|
|
cargo-doc:
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
default: true
|
|
- name: run cargo doc
|
|
env:
|
|
RUSTDOCFLAGS: -D warnings
|
|
run: |
|
|
cargo doc -p interactive-clap
|
|
cargo doc -p interactive-clap-derive --document-private-items
|