Skip to content

The truth

The truth #151

Workflow file for this run

name: Conditional Dependency Installation
on: [push, pull_request]
jobs:
dependency_install:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
- name: Set up Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Check Number of Dependencies in UI Directory
run: |
cd ./
DEP_COUNT=$(jq '.dependencies | length' package.json)
echo "Number of dependencies: $DEP_COUNT"
echo "DEPENDENCY_COUNT=$DEP_COUNT" >> $GITHUB_ENV
- name: Install Dependencies with NPM in UI Directory
if: ${{ env.DEPENDENCY_COUNT && env.DEPENDENCY_COUNT <= 20 }}
run: |
cd ./
npm install
- name: Install Dependencies with Bun in UI Directory
if: ${{ env.DEPENDENCY_COUNT && env.DEPENDENCY_COUNT > 20 }}
run: |
cd ./
bun install