name: Check stable

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  get-leptos-changed:
    uses: ./.github/workflows/get-leptos-changed.yml

  test:
    name: Check
    needs: [get-leptos-changed]
    if: needs.get-leptos-changed.outputs.leptos_changed == 'true'
    strategy:
      matrix:
        directory: [examples/counters_stable, examples/counter_without_macros]
    uses: ./.github/workflows/run-cargo-make-task.yml
    with:
      directory: ${{ matrix.directory }}
      cargo_make_task: "check"
      toolchain: stable
