# yaml-language-server: $schema=https://json.schemastore.org/github-action.json

name: Setup Bun dependencies
description: Node 24, Bun, cache та bun install --frozen-lockfile (checkout — окремим кроком у workflow)

runs:
  using: composite
  steps:
    - uses: actions/setup-node@v6
      with:
        node-version: '24'

    - uses: oven-sh/setup-bun@v2

    - name: Cache Bun dependencies
      uses: actions/cache@v5
      with:
        path: |
          ~/.bun/install/cache
          node_modules
        key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
        restore-keys: |
          ${{ runner.os }}-bun-

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