Add Push CI workflow #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🔗Pull Request Checks Workflow | |
on: | |
pull_request: | |
branches: | |
- main | |
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 | |
run: pnpm typecheck | |
- name: 🧪 Run tests | |
run: pnpm test |