shell_exec 0.2.1

Cross platform library to execute shell scripts
Documentation
name: Run CI

on:
  pull_request:
  push:
    branches:
      - 'main'
      - 'dev'

concurrency:
  group: test-${{ github.ref_name }}
  cancel-in-progress: true

jobs:
  lint:
    runs-on: ubuntu-latest
    timeout-minutes: 5

    steps:
      - name: Checkout project
        uses: actions/checkout@v4

      - name: Setup Rust
        uses: caido/action-setup-rust@v1
        with:
          cache: false

      - name: Run linter
        uses: giraffate/clippy-action@871cc4173f2594435c7ea6b0bce499cf6c2164a1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          clippy_flags: --all-features -- -D warnings
          reporter: github-pr-review

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

  test:
    needs: lint
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10

    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]

    steps:
      - name: Checkout project
        uses: actions/checkout@v4

      - name: Setup Rust
        uses: caido/action-setup-rust@v1
        with:
          cache: false

      - name: Setup WSL
        if: ${{ matrix.os == 'windows-latest' }}
        uses: caido/action-setup-wsl@v4
        with:
          distribution: Ubuntu-22.04

      - name: Run tests
        run: cargo test