Skip to content

Set up prettier, knip and jest #15

Set up prettier, knip and jest

Set up prettier, knip and jest #15

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-and-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 20.x
cache: yarn
cache-dependency-path: yarn.lock
- name: Install dependencies
run: yarn
- name: Log Versions
run: yarn tsc --version && yarn jest --version
- name: Prettier
run: yarn format:check
- name: Type Check
run: yarn tsc
# knip runs after tsc so that files can reference the `dist` dir.
- name: Knip
run: yarn knip
- name: Unit tests
run: yarn test