Skip to content

Commit

Permalink
fixes yml bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Adebesin-Cell committed Jun 29, 2024
1 parent 3c507d2 commit 591a3ea
Showing 1 changed file with 13 additions and 38 deletions.
51 changes: 13 additions & 38 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 591a3ea

Please sign in to comment.