rt_ref 0.2.0

Internal `Ref` types for `rt_ref` and `rt_vec`.
Documentation
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - '**'

name: CI

jobs:
  audit:
    name: Audit
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v1
      - uses: actions-rs/audit-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

  fmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true
          components: rustfmt

      - uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check

  docs_and_spell_check:
    name: Docs and Spell Check
    runs-on: ubuntu-latest
    timeout-minutes: 3
    env:
      RUSTDOCFLAGS: "-Dwarnings"
    steps:
      - name: Checkout Actions Repository
        uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      - name: Check spelling
        uses: crate-ci/typos@master

      - uses: actions-rs/cargo@v1
        with:
          command: doc
          args: --no-deps

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true
          components: clippy

      - name: Install Clippy
        run: rustup component add clippy

      - uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: -- -D warnings

  coverage:
    name: Coverage
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true
          components: llvm-tools-preview

      - uses: taiki-e/install-action@cargo-llvm-cov
      - uses: taiki-e/install-action@nextest

      - name: 'Collect coverage'
        run: ./coverage.sh

      - name: Upload to codecov.io
        uses: codecov/codecov-action@v1
        with:
          file: ./target/coverage/lcov.info

  build_and_test_linux:
    name: Build and Test (Linux)
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      - uses: actions-rs/cargo@v1
        with:
          command: test
          args: --release

  build_and_test_windows:
    name: Build and Test (Windows)
    runs-on: windows-latest
    timeout-minutes: 10
    steps:
      - name: Prepare symlink configuration
        run: git config --global core.symlinks true

      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      - uses: actions-rs/cargo@v1
        with:
          command: test
          args: --release