shared-vec 0.1.0

Efficient shared container types
Documentation
on:
  push:
    branches:
      - "*" # Run benchmarks on all branches.
  schedule:
    - cron: "0 0 10 * 0" # Run tests the 10th day of every month at midnight.

name: Build, Lint and Test

jobs:
  check:
    name: Check and Test Coverage
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - rust: 1.87.0
            components: rustfmt, clippy
            os: ubuntu-latest
          - rust: stable # Run code coverage only on stable
            components: rustfmt, clippy, llvm-tools-preview
            os: ubuntu-latest
          - rust: nightly # Run MIRI tests only on nightly
            components: rustfmt, clippy, miri, rust-src
            os: ubuntu-latest
          - rust: nightly # Run MIRI tests only on nightly
            components: rustfmt, clippy, miri, rust-src
            os: macos-latest
          - rust: nightly # Run MIRI tests only on nightly
            components: rustfmt, clippy, miri, rust-src
            os: windows-latest
    steps:
      # Checkout Code
      - uses: actions/checkout@v4
      # Setup Rust and Tools
      - name: Install Rust Toolchain
        uses: dtolnay/rust-toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          components: ${{ matrix.components }}
      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov
        if: matrix.rust == 'stable'
      # Linting
      - name: cargo fmt
        run: cargo fmt --all -- --check
      - name: cargo clippy
        run: cargo clippy --all-features --all-targets
      # Run Tests
      - run: cargo test
      - run: cargo test --features miette
      - run: cargo test --features schemars
      - run: cargo test --features serde
      - run: cargo test --features std
      - run: cargo test --all-features
      # MIRI Tests
      - run: cargo miri test --all-features
        if: matrix.rust == 'nightly'
      # Code Coverage
      - name: Generate Code Coverage
        run: cargo llvm-cov --all-features --lcov --output-path lcov.info
        if: matrix.rust == 'stable'
      - name: Upload Results to Codecov
        uses: codecov/codecov-action@v3
        with:
          file: lcov.info
          flags: unittests
          name: shared-vec
          fail_ci_if_error: true
          token: ${{ secrets.CODECOV_TOKEN }}
          verbose: true
        if: matrix.rust == 'stable'