tercul-frontend/.github/workflows/lint.yml
Damir Mukimov a3ffebdf0c
Fix Corepack/Yarn caching issue in CI workflows
- Remove cache: yarn from setup-node action to prevent yarn usage before corepack enable
- Enable corepack immediately after Node.js setup
- Add manual yarn caching using actions/cache@v4 with proper cache directory path
- This resolves the packageManager field conflict in CI
2025-11-27 06:33:19 +01:00

42 lines
979 B
YAML

name: Lint
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
typescript-lint:
name: TypeScript & ESLint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Enable Corepack
run: corepack enable
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Cache yarn dependencies
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Type check
run: yarn lint