Skip to content

Commit

Permalink
ci: 💚 add workflows for typechecking and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
flixlix committed Apr 14, 2024
1 parent 940987b commit b738fb9
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/format-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Format Check

on:
push:
branches:
- "*"

jobs:
format-check:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache pnpm modules
id: cache-modules
uses: actions/cache@v2
with:
path: |
~/.pnpm-store
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'rollup.config.js') }}
restore-keys: |
${{ runner.os }}-
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: latest
run_install: false

- name: Install Packages
if: steps.cache-modules.outputs.cache-hit != 'true'
run: pnpm install --no-frozen-lockfile

- name: Format Check
run: pnpm format:check
38 changes: 38 additions & 0 deletions .github/workflows/typecheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Typecheck

on:
push:
branches:
- '*'

jobs:
typecheck:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache pnpm modules
id: cache-modules
uses: actions/cache@v2
with:
path: |
~/.pnpm-store
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'rollup.config.js') }}
restore-keys: |
${{ runner.os }}-
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: latest
run_install: false

- name: Install Packages
if: steps.cache-modules.outputs.cache-hit != 'true'
run: pnpm install --no-frozen-lockfile

- name: Typecheck
run: pnpm typecheck

0 comments on commit b738fb9

Please sign in to comment.