diff --git a/.github/workflows/pr-lint-check.yml b/.github/workflows/pr-lint-check.yml index 60489d0..39b24a5 100644 --- a/.github/workflows/pr-lint-check.yml +++ b/.github/workflows/pr-lint-check.yml @@ -20,13 +20,30 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'npm' + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Run ESLint - run: npm run lint + run: pnpm run lint - name: Comment PR on failure if: failure() diff --git a/.github/workflows/push-lint-check.yml b/.github/workflows/push-lint-check.yml index b8fd69b..2242160 100644 --- a/.github/workflows/push-lint-check.yml +++ b/.github/workflows/push-lint-check.yml @@ -21,15 +21,32 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'npm' + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Run ESLint - run: npm run lint + run: pnpm run lint - name: Notify on failure if: failure() run: | - echo "::error::ESLint check failed. Please run 'npm run lintfix' locally to fix issues." + echo "::error::ESLint check failed. Please run 'pnpm run lintfix' locally to fix issues." diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml index 54a54a0..a199ce1 100644 --- a/.github/workflows/security-audit.yml +++ b/.github/workflows/security-audit.yml @@ -31,7 +31,7 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 with: - version: 8 + version: 10 - name: Get pnpm store directory shell: bash