cutlery 0.1.0

Cross-platform fork
Documentation
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json

name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  CARGO_TERM_COLOR: always

jobs:
  run-tests:
    name: Run tests on ${{ matrix.os }}
    strategy:
      matrix:
        os: ["ubuntu-latest", "windows-latest"]
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v4
    - uses: actions-rust-lang/setup-rust-toolchain@v1
    - uses: Swatinem/rust-cache@v2
    - name: Run tests
      shell: bash
      run: cargo test -- --test-threads=1 --nocapture
    - name: Run tests with no default features
      if: runner.os == 'Linux'
      shell: bash
      run: cargo test --no-default-features -- --test-threads=1 --nocapture

  spelling:
    name: Spell check with typos
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Spell Check Repo
      uses: crate-ci/typos@master
  
  check:
    name: Lint on ${{ matrix.os }}
    strategy:
      matrix:
        os: ["ubuntu-latest", "windows-latest"]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          components: rustfmt, clippy
      - name: Setup nightly toolchain
        shell: bash
        run: rustup toolchain install nightly --component rustfmt # needed to run rustfmt in nightly toolchain
      - name: Check formatting
        shell: bash
        run: cargo +nightly fmt -- --check
      - name: Check clippy
        shell: bash
        run: cargo clippy -- -D warnings
      - name: Check clippy with no default features
        if: runner.os == 'Linux'
        shell: bash
        run: cargo clippy --no-default-features -- -D warnings