jao 0.3.4

Discover and run workspace scripts from a simple CLI
name: Jao dev CI

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
  workflow_dispatch:

jobs:
  cargo-hack:
    name: cargo-hack (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - windows-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Install cargo-hack
        uses: taiki-e/install-action@cargo-hack

      - name: Report toolchain
        run: |
          rustc --version
          cargo --version

      - name: Build all feature combinations
        run: cargo hack build --locked --each-feature

  test:
    name: test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - windows-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Report toolchain
        run: |
          rustc --version
          cargo --version

      - name: Run tests
        run: cargo test --locked

  docs:
    name: docs
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Generate docs
        run: bash scripts/gen.docs.sh

  docker:
    name: docker
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Build Docker image
        uses: docker/build-push-action@v6
        with:
          context: .
          file: ./Dockerfile
          push: false
          tags: jao:ci