Use compact-str #150
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and tests | |
| on: | |
| push: | |
| branches: [ main, master, 'v0.[0-9]+' ] | |
| pull_request: | |
| schedule: | |
| - cron: "0 2 * * *" | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| - name: Verify lockfile | |
| run: cargo check --locked | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: | | |
| cargo clippy --all-targets -- -D warnings | |
| cargo clippy --all-targets --no-default-features --features compact_str -- -D warnings | |
| cargo clippy --all-targets --no-default-features --features smartstring -- -D warnings | |
| - name: Build docs | |
| run: | | |
| cargo doc --no-deps | |
| cargo doc --no-deps --no-default-features --features compact_str | |
| cargo doc --no-deps --no-default-features --features smartstring | |
| tests: | |
| name: "Tests: ${{ matrix.os }} @ ${{ matrix.channel }}" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| channel: [stable, beta, nightly] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| toolchain: ${{ matrix.channel }} | |
| - uses: taiki-e/install-action@0abfcd587b70a713fdaa7fb502c885e2112acb15 # v2.75.7 | |
| with: | |
| tool: cargo-hack | |
| - name: Each version feature | |
| run: cargo hack test --lib --each-feature | |
| - name: Docs | |
| run: | | |
| cargo test --doc | |
| cargo test --no-default-features --features compact_str --doc | |
| cargo test --no-default-features --features smartstring --doc | |
| - name: Examples | |
| run: | | |
| cargo test --examples | |
| cargo test --no-default-features --features compact_str --examples | |
| cargo test --no-default-features --features smartstring --examples |