Skip to content

Add Push CI workflow #3

Add Push CI workflow

Add Push CI workflow #3

name: 🔗Pull Request Checks Workflow
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
jobs:
checks:
name: 🫸 Pull Request Checks
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 📦 Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
- name: 🗂️ Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: 🛠️ Set up Node.js
uses: actions/setup-node@v4
with:
node-version: current
cache: 'pnpm'
- name: 🗄️ Setup pnpm cache
uses: actions/cache@v4
with:
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
- name: 📝 Format code
# this step should:
# - only be run on the code that has been changed
# - not apply automatic fixes
# - add a comment to the pull request with the changes
run: pnpm format
- name: 🚨 Lint code
# this step should:
# - only be run on the code that has been changed
# - not apply automatic fixes
# - add a comment to the pull request with the changes
run: pnpm lint
- name: 🔍 Typecheck code
# this step should:
# - only be run on the code that has been changed
# - not apply automatic fixes
# - add a comment to the pull request with the changes
run: pnpm typecheck
- name: 🧪 Run tests
run: pnpm test