name: Action
on:
  push:
    branches:
      - "main"
      - "**action**"
  pull_request:
    paths:
      - ".github/workflows/action.yml"
      - ".github/action_helper.py"
      - "action.yml"
  workflow_dispatch:
    # allow manual runs on branches without a PR

env:
  FORCE_COLOR: "1"

permissions: {}

jobs:
  action-default-tests:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - ubuntu-24.04
          - ubuntu-24.04-arm
          - windows-2022
          - windows-2025
          - windows-11-arm
          - macos-15-intel
          - macos-15
    steps:
      - uses: actions/checkout@v5
        with:
          persist-credentials: false
      - uses: astral-sh/setup-uv@v7
      - uses: ./
      - run: nox --session github_actions_default_tests

  action-all-tests:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v5
        with:
          persist-credentials: false
      - uses: actions/setup-python@v6
        with:
          python-version: 3.12
      - uses: ./
        with:
          python-versions: "pypy-2.7, pypy-3.8, pypy-3.9, pypy-3.10, pypy-3.11, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14, 3.13t, 3.14t"
      - run: nox --session github_actions_all_tests
