name: Setup
description: Setup the environment for the project

runs:
  using: composite

  steps:
    - name: Install Bun
      uses: oven-sh/setup-bun@v2
      with:
        bun-version: "latest"

    - name: Setup cache
      uses: actions/cache@v4
      with:
        path: ~/.bun/install/cache
        key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lock') }}
        restore-keys: |
          ${{ runner.os }}-${{ matrix.bun }}-bun-

    - name: Install dependencies
      shell: bash
      run: bun install
