Skip to content

Commit

Permalink
Add tracing example, strict feature, more tests... (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja authored Aug 28, 2024
1 parent c40e8d3 commit 0808dc5
Show file tree
Hide file tree
Showing 20 changed files with 2,957 additions and 365 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ indent_size = 2
[*.css]
indent_size = 2

[*.{json,json5,js}]
[*.{json,json5,js,sh}]
indent_size = 2
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto
Cargo.lock -diff

# Don't export/archive these files
.github export-ignore
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
features:
- []
- [tracing]
- [strict]
- [tracing, strict]
steps:
- uses: actions/checkout@v4
- name: Setup Rust
Expand All @@ -53,13 +55,16 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ matrix.rust-toolchain }}-${{ join(matrix.features, ',') }}
- name: Run
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.rust-toolchain }}-${{ join(matrix.features, '-') }}
- name: Unit tests
if: matrix.features[0] != null
run: cargo test -p svg-path-cst --features ${{ join(matrix.features, ',') }}
- name: Run
- name: Unit tests
if: matrix.features[0] == null
run: cargo test -p svg-path-cst
- name: Integration tests
if: matrix.os != 'windows-latest'
run: sh src/tests/integration.sh

test-release-crate:
name: Test crate release
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
target/
Cargo.lock
.prettier-cache
*.svg
*.data
*.data.old
*.data.old
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ repos:
- --cache
- --cache-location=.prettier-cache
- --ignore-path=.gitignore
- repo: meta
hooks:
- id: check-hooks-apply
name: check-hooks-apply
- id: check-useless-excludes
name: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
name: trailing-whitespace
- id: end-of-file-fixer
name: end-of-file-fixer
exclude: fuzz/
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.13.0
hooks:
- id: markdownlint-cli2
exclude: ^LICENSE\.md$
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
Expand Down Expand Up @@ -50,6 +69,26 @@ repos:
-D,
clippy::semicolon_if_nothing_returned,
]
- id: clippy
alias: clippy-strict
name: clippy-strict
args:
[
--features=strict,
--,
-D,
warnings,
-D,
clippy::perf,
-D,
clippy::print_stdout,
-D,
clippy::explicit_iter_loop,
-D,
clippy::uninlined_format_args,
-D,
clippy::semicolon_if_nothing_returned,
]
- repo: https://github.com/mondeja/rust-pc-hooks
rev: v1.2.0
hooks:
Expand Down
Loading

0 comments on commit 0808dc5

Please sign in to comment.