mirror of
https://github.com/toss/es-toolkit.git
synced 2024-12-01 02:33:54 +03:00
98 lines
2.0 KiB
YAML
98 lines
2.0 KiB
YAML
|
version: 2.1
|
||
|
|
||
|
parameters:
|
||
|
pull_request:
|
||
|
type: boolean
|
||
|
default: false
|
||
|
|
||
|
orbs:
|
||
|
slack: circleci/slack@4.5.0
|
||
|
|
||
|
commands:
|
||
|
setup:
|
||
|
steps:
|
||
|
- run:
|
||
|
name: Install yarn
|
||
|
command: |
|
||
|
COREPACK_PATH=$HOME/.local/bin
|
||
|
|
||
|
mkdir -p $COREPACK_PATH
|
||
|
eval "$(echo PATH=$COREPACK_PATH:\$PATH | tee -a $BASH_ENV)"
|
||
|
|
||
|
corepack enable --install-directory $COREPACK_PATH
|
||
|
yarn install
|
||
|
|
||
|
jobs:
|
||
|
lint:
|
||
|
docker:
|
||
|
- image: cimg/node:20.12
|
||
|
steps:
|
||
|
- checkout
|
||
|
- setup
|
||
|
- run:
|
||
|
name: Lint
|
||
|
command: yarn eslint -c .eslintrc.js $(git diff --name-only --diff-filter=ACMRUXB origin/main | grep -E "(.js$|.ts$|.tsx$)")
|
||
|
typecheck:
|
||
|
docker:
|
||
|
- image: cimg/node:20.12
|
||
|
steps:
|
||
|
- checkout
|
||
|
- setup
|
||
|
- run:
|
||
|
name: Typecheck
|
||
|
command: yarn tsc --noEmit
|
||
|
pre-pack:
|
||
|
docker:
|
||
|
- image: cimg/node:20.12
|
||
|
steps:
|
||
|
- checkout
|
||
|
- setup
|
||
|
- run:
|
||
|
name: Build
|
||
|
command: yarn build
|
||
|
check-peer:
|
||
|
docker:
|
||
|
- image: cimg/node:20.12
|
||
|
steps:
|
||
|
- checkout
|
||
|
- setup
|
||
|
- run:
|
||
|
name: Check Peer Dependency
|
||
|
command: ./.scripts/check-peer.sh || (echo "Peer Dependency 오류가 발생했습니다."; exit -1)
|
||
|
test:
|
||
|
docker:
|
||
|
- image: cimg/node:20.12
|
||
|
steps:
|
||
|
- checkout
|
||
|
- setup
|
||
|
- run:
|
||
|
name: vitest
|
||
|
command: yarn vitest --reporter=junit > ./.junit
|
||
|
- store_test_results:
|
||
|
path: ./.junit
|
||
|
- store_artifacts:
|
||
|
path: ./.junit
|
||
|
|
||
|
workflows:
|
||
|
main:
|
||
|
jobs:
|
||
|
- test:
|
||
|
filters:
|
||
|
branches:
|
||
|
ignore: main
|
||
|
- lint:
|
||
|
filters:
|
||
|
branches:
|
||
|
ignore: main
|
||
|
- typecheck:
|
||
|
filters:
|
||
|
branches:
|
||
|
ignore: main
|
||
|
- pre-pack:
|
||
|
filters:
|
||
|
branches:
|
||
|
ignore: main
|
||
|
- check-peer:
|
||
|
filters:
|
||
|
branches:
|
||
|
ignore: main
|