Skip to content

Setup/ci

Setup/ci #8

Workflow file for this run

name: CI
on:
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c
- name: Install dependencies
run: pnpm install
- name: Run format check on modified files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
if [ -n "$ALL_CHANGED_FILES" ]; then
echo $ALL_CHANGED_FILES | xargs pnpm prettier --check
else
echo "No files to format"
fi
- name: Run lint on modified files
run: |
if [ -n "$ALL_CHANGED_FILES" ]; then
echo $ALL_CHANGED_FILES | xargs pnpm lint
else
echo "No changed files for ESLint."
fi
- name: Run tests
run: pnpm run test