name: 'Lint, Unit & Integration Tests'

"on":

pull_request:

env:

CHEF_LICENSE_KEY: ${{ secrets.CHEF_LICENSE_KEY }}

jobs:

lint-unit:
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@main

integration-windows:
name: Windows ${{matrix.suite}} ${{matrix.os}}
runs-on: windows-latest
needs: lint-unit
strategy:
  fail-fast: false
  matrix:
    suite:
      - default
    os:
      - windows-2022
steps:
  - uses: actions/checkout@v7
  - uses: ruby/setup-ruby@v1
    with:
      ruby-version: "3.4"
      bundler-cache: true
  - run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}

integration-linux:
name: Linux ${{matrix.suite}} ${{matrix.os}}
runs-on: ubuntu-latest
needs: lint-unit
strategy:
  fail-fast: false
  matrix:
    suite:
      - default
      - no-build-context
      - arm64
      - amd64
      - inspec
    os:
      - almalinux-8
      - almalinux-9
      - almalinux-10
      - amazonlinux-2023
      - ubuntu-2204
      - ubuntu-2404
      - ubuntu-2604
      - fedora-latest
      - centos-stream-9
      - centos-stream-10
      - oraclelinux-8
      - oraclelinux-9
      - oraclelinux-10
      - rockylinux-8
      - rockylinux-9
      - rockylinux-10
      - debian-13
      - opensuse-16
      - dockerfile
steps:
  - uses: actions/checkout@v7
  - uses: ruby/setup-ruby@v1
    with:
      ruby-version: "3.4"
      bundler-cache: true
  - name: Set up QEMU
    uses: docker/setup-qemu-action@v4
  - name: Set up Docker Buildx
    uses: docker/setup-buildx-action@v4
  - run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}

integration-capabilities:
name: Linux ${{matrix.suite}} ${{matrix.os}}
runs-on: ubuntu-latest
needs: lint-unit
strategy:
  fail-fast: false
  matrix:
    suite:
      - capabilities
    os:
      - ubuntu-2204
      - ubuntu-2404
      - ubuntu-2604
steps:
  - uses: actions/checkout@v7
  - uses: ruby/setup-ruby@v1
    with:
      ruby-version: "3.4"
      bundler-cache: true
  - name: Set up Docker Buildx
    uses: docker/setup-buildx-action@v4
  - run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}