name: "Copilot Setup Steps"

# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
    workflow_dispatch:
    push:
        paths:
            - .github/workflows/copilot-setup-steps.yml
    pull_request:
        paths:
            - .github/workflows/copilot-setup-steps.yml

jobs:
    # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
    copilot-setup-steps:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v5
            - name: Set up Python
              uses: actions/setup-python@v6
              with:
                  python-version: "3.10"
            - name: Setup Just
              uses: extractions/setup-just@v3
            - name: Install uv and set the Python version
              uses: astral-sh/setup-uv@v6
              with:
                  python-version: "3.10"
            - name: Install the project
              run: uv sync --locked --all-extras --dev
