Skip to content

Commit

Permalink
feat: ci using pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
sushanyadav committed Jan 23, 2024
1 parent 2c57537 commit 375f0d5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
One liner description (or quick point form) of what was done

### Screenshots / Videos

- Include a screenshot or video of work done

### How to test?

- Add a url where reviewers can go to see changes
54 changes: 30 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
name: Build

name: Main
on:
push:
branches:
- main
pull_request:

jobs:
build:
main:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Configure yarn caching
uses: actions/cache@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Restore cached npm dependencies
id: cache-dependencies-restore
uses: actions/cache/restore@v3
with:
path: ~/.yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/workflows/prettier.yml') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
path: |
node_modules
~/.cache/Cypress # needed for the Cypress binary
key: npm-dependencies-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm install --frozen-lockfile
- name: Cache npm dependencies
id: cache-dependencies-save
uses: actions/cache/save@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- name: Install dependencies
run: yarn install
path: |
node_modules
~/.cache/Cypress # needed for the Cypress binary
key: ${{ steps.cache-dependencies-restore.outputs.cache-primary-key }}
- name: Format the code
run: yarn run prettier
run: pnpm run prettier
- name: Check the code style
run: yarn run lint:eslint
run: pnpm run lint
- name: Check the types
run: yarn run check-types
run: pnpm run check-types
- name: Build the project
run: yarn run build
run: pnpm run build

0 comments on commit 375f0d5

Please sign in to comment.