Skip to content

Commit

Permalink
fix(ci): remove import path from type names on compact-codec (#12125)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshieDo authored Oct 28, 2024
1 parent 0f86287 commit e4bd135
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/compact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ jobs:
ref: ${{ github.base_ref || 'main' }}
# On `main` branch, generates test vectors and serializes them to disk using `Compact`.
- name: Generate compact vectors
run: ${{ matrix.bin }} -- test-vectors compact --write
run: |
${{ matrix.bin }} -- test-vectors compact --write &&
for f in ./testdata/micro/compact/*; do mv "$f" "$(dirname "$f")/$(basename "$f" | awk -F '__' '{print $NF}')"; done
- name: Checkout PR
uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/commands/src/test_vectors/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,5 @@ where
}

pub fn type_name<T>() -> String {
std::any::type_name::<T>().replace("::", "__")
std::any::type_name::<T>().split("::").last().unwrap_or(std::any::type_name::<T>()).to_string()
}

0 comments on commit e4bd135

Please sign in to comment.