From f4864c888cdb19e9fbd692c0d9b2f5748a3b2ed4 Mon Sep 17 00:00:00 2001 From: Parajuli Kiran Date: Wed, 20 Dec 2023 12:59:05 +0545 Subject: [PATCH] Actions management Signed-off-by: Parajuli Kiran --- .github/workflows/ci.yml | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00fae5a..5d1bb47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,31 +6,42 @@ on: name: CI +concurrency: + group: build-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: lint: runs-on: ubuntu-latest steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - all_but_latest: true - access_token: ${{ secrets.GITHUB_TOKEN }} - - name: Checkout uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2.2.2 + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2 with: - version: 7.x.x + version: latest + run_install: false - - name: Setup NodeJS - uses: actions/setup-node@v3 + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache with: - node-version: '16' - cache: 'pnpm' + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install - name: EsLint run: pnpm lint