연속 통합
pnpm은 다양한 ci 시스템들과 함께 사용하기 쉽습니다.
note
In all the provided configuration files the store is cached. However, this is not required, and it is not guaranteed that caching the store will make installation faster. So feel free to not cache the pnpm store in your job.
Travis
Travis CI에선 다음과 같은 코드를 .travis.yml
에 추가함으로써 pnpm을 dependencies를 설치하는데 사용할 수 있습니다:
.travis.yml
cache:
npm: false
directories:
- "~/.pnpm-store"
before_install:
- corepack enable
- corepack prepare pnpm@latest-8 --activate
- pnpm config set store-dir ~/.pnpm-store
install:
- pnpm install
Semaphore
Semaphore에선 다음과 같은 코드를 .semaphore/semaphore.yml
에 추가함으 로써 pnpm을 dependencies를 설치하고 캐싱하는데에 사용할 수 있습니다:
.semaphore/semaphore.yml
version: v1.0
name: Semaphore CI pnpm example
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804
blocks:
- name: Install dependencies
task:
jobs:
- name: pnpm install
commands:
- corepack enable
- corepack prepare pnpm@latest-8 --activate
- checkout
- cache restore node-$(checksum pnpm-lock.yaml)
- pnpm install
- cache store node-$(checksum pnpm-lock.yaml) $(pnpm store path)