chore(license): add MIT license #12
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
setup: | |
name: Setup Workspace | |
runs-on: ubuntu-latest | |
outputs: | |
cache-hit: ${{ steps.cache-deps.outputs.cache-hits }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 8.6.3 | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.18.0 | |
cache: 'pnpm' | |
- name: Cache PNPM Store | |
id: cache-deps | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm-store- | |
- name: Install Dependencies (cache missing) | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: pnpm install --frozen-lockfile --prefer-offline --config.ignore-scripts=true | |
linting: | |
name: Run Linting, Formatting, and Typecheck | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 8.6.3 | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.18.0 | |
cache: 'pnpm' | |
- name: Use Cached Dependencies | |
run: pnpm install --frozen-lockfile --offline | |
- name: Lint Check | |
run: pnpm run lint | |
- name: Format Check | |
run: pnpm run format:verify | |
- name: Typecheck | |
run: pnpm run typecheck | |
Tests: | |
name: Run Unit Tests | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 8.6.3 | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.18.0 | |
cache: 'pnpm' | |
- name: Use Cached Dependencies | |
run: pnpm install --frozen-lockfile --offline | |
- name: Unit Tests | |
run: pnpm run test |