name: "Setup Turborepo Environment"
description: "Sets up development environment for turborepo"
inputs:
  github-token:
    description: "GitHub token. You can pass secrets.GITHUB_TOKEN"
    required: true
  node-version:
    description: Node version
    required: false

runs:
  using: "composite"
  steps:
    - name: "Setup Node"
      uses: ./.github/actions/setup-node
      with:
        extra-flags: --no-optional
        node-version: ${{ inputs.node-version }}
      env:
        PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1

    - name: "Setup Rust"
      uses: ./.github/actions/setup-rust
      with:
        shared-cache-key: turborepo-debug-build
        cache-key: ${{ inputs.target }}
        save-cache: true
        github-token: ${{ inputs.github-token }}

    - name: "Setup capnproto"
      uses: ./.github/actions/setup-capnproto
