xpct 0.5.1

An extensible test assertion library
Documentation
name: Test

on: [push, pull_request]

jobs:
  # We run `cargo check` pinned to this crate's MSRV to ensure we're not
  # accidentally using more recent Rust features.
  check:
    name: "Check"
    runs-on: ubuntu-latest
    env:
      RUSTFLAGS: "-D warnings"
    steps:
      - name: "Checkout sources"
        uses: actions/checkout@v2

      - name: "Install rust toolchain"
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          # If you update this, update the Cargo.toml as well.
          toolchain: "1.70.0"
          override: true

      - name: "Run cargo check"
        uses: actions-rs/cargo@v1
        with:
          command: check
          args: "--all-features"

  # We run tests on nightly so that the doctests in the `crate::docs` module
  # are included.
  test:
    name: "Tests"
    runs-on: ubuntu-latest
    env:
      RUSTDOCFLAGS: "-D warnings --cfg docsrs"
    steps:
      - name: "Checkout sources"
        uses: actions/checkout@v2

      - name: "Install rust toolchain"
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true

      - name: "Run cargo test"
        uses: actions-rs/cargo@v1
        with:
          toolchain: nightly
          command: test
          args: "--all-features"

  lints:
    name: "Linters"
    runs-on: ubuntu-latest
    env:
      RUSTFLAGS: "-D warnings"
    steps:
      - name: "Checkout sources"
        uses: actions/checkout@v2

      - name: "Install rust toolchain"
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
          components: rustfmt, clippy

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

      - name: "Run cargo clippy"
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: "--all-features"

  # We build the docs on nightly so that the docs in the `crate::docs` module
  # are included.
  docs:
    name: "Docs"
    runs-on: ubuntu-latest
    env:
      RUSTDOCFLAGS: "-D warnings --cfg docsrs"
    steps:
      - name: "Checkout sources"
        uses: actions/checkout@v2

      - name: "Install rust toolchain"
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true

      - name: "Run cargo doc"
        uses: actions-rs/cargo@v1
        with:
          toolchain: nightly
          command: doc
          args: "--all-features --no-deps"