From 591a3eaa24b11552cddecd7f208b6573b77fc0c9 Mon Sep 17 00:00:00 2001 From: Adebesin Cell Date: Sat, 29 Jun 2024 02:07:19 +0100 Subject: [PATCH] fixes yml bug --- .github/workflows/push.yml | 51 ++++++++++---------------------------- 1 file changed, 13 insertions(+), 38 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 9123935..effd602 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,56 +1,31 @@ -name: Push checks +name: Lint on: [push] jobs: - Checkout: + ci: + name: Lint runs-on: ubuntu-latest - timeout-minutes: 7 + environment: production steps: - - name: Setup Node.js environment - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 with: - node-version: 16 - - - name: Install pnpm - uses: pnpm/action-setup@v2 + fetch-depth: 1 + - uses: pnpm/action-setup@v4 with: - version: 7 # or whatever version you prefer - - - name: Check out code - uses: actions/checkout@v3 + version: 9.1.3 + - uses: actions/setup-node@v4 with: - fetch-depth: 1 - + node-version: 20 - name: Get pnpm store directory - id: pnpm-cache shell: bash run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v3 + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + - uses: actions/cache@v4 name: Setup pnpm cache with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + path: ${{ env.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - - name: Generate pnpm-lock.yaml if it doesn't exist - run: | - if [ ! -f pnpm-lock.yaml ]; then - echo "pnpm-lock.yaml not found. Generating it..." - pnpm install --lockfile-only - else - echo "pnpm-lock.yaml found. Proceeding with installation..." - fi - - name: Installing dependencies run: pnpm install --frozen-lockfile - - - name: Lint - run: pnpm lint - - - name: Build - run: pnpm build - - - name: Tests - run: pnpm test \ No newline at end of file