drogue-bazaar 0.3.0

A place to find tools for building your Rust application
Documentation
name: CI

on:
  push:
    # Run on the main branch
    branches:
      - main

  pull_request:
    branches:
      - main

jobs:


  format:
    runs-on: ubuntu-22.04

    steps:
      - uses: actions/checkout@v3

      - name: Run cargo fmt
        run: |
          cargo fmt --all -- --check


  check:
    runs-on: ubuntu-22.04

    needs:
      - format

    strategy:
      matrix:
        toolchain:
          - stable
          - 1.61.0 # msrv (minimum supported rust version)
        target:
          - x86_64-unknown-linux-gnu

    steps:

      - uses: actions/checkout@v3

      - uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.toml') }}

      - name: Install toolchain
        run: |
          rustup toolchain install ${{ matrix.toolchain }} --target ${{ matrix.target }} --component clippy

      - name: Install cargo-check-all
        run: |
          cargo install --force cargo-all-features

      - name: Run cargo check
        run: |
          cargo check-all-features --target ${{ matrix.target }} ${{ matrix.features }}


  test:
    # we run tests only on the stable version, with defaults enabled

    runs-on: ubuntu-22.04

    needs:
      - check

    steps:

      - uses: actions/checkout@v3

      - uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.toml') }}

      - name: Run cargo test
        run: |
          cargo test