caching node modules test

This commit is contained in:
Core 2022-08-25 17:22:18 +01:00
parent c26961fc30
commit 1e254b578b
No known key found for this signature in database
GPG key ID: 2AB8327FBA02D1C0

View file

@ -12,7 +12,8 @@ orbs: # Add orbs to your configuration
# The jobs for this project # The jobs for this project
jobs: jobs:
prepare-build: prepare-build:
executor: cider-ci docker:
- image: znck/pnpm:latest
steps: steps:
- checkout - checkout
- run: - run:
@ -20,26 +21,19 @@ jobs:
command: | command: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y autoconf automake g++ libtool || true sudo apt-get install -y autoconf automake g++ libtool || true
sudo curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
pnpm config set store-dir ~/.pnpm-store pnpm config set store-dir ~/.pnpm-store
- run: - run:
name: Fetch Application Version name: Fetch Application Version
command: sudo chmod +x resources/version.sh && ./resources/version.sh || true command: sudo chmod +x resources/version.sh && ./resources/version.sh || true
- restore_cache: - restore_cache:
name: Restore cached node-modules key: dependency-cache-{{ checksum "pnpm-lock.yaml" }}
keys:
- node-{{ checksum "pnpm-lock.yaml" }}
- run:
name: Clear node_airtunes2 cache
command: sudo rm -rf ~/.pnpm-store/tmp/cf5bc2de2629636ca224995234b8eaa1 || true
- run: - run:
name: Install Node Dependencies name: Install Node Dependencies
command: pnpm install command: pnpm install --frozen-lockfile
- save_cache: - save_cache:
name: Cache node-modules key: dependency-cache-{{ checksum "pnpm-lock.yaml" }}
key: node-{{ checksum "pnpm-lock.yaml" }}
paths: paths:
- ~/.pnpm-store - node_modules
- run: - run:
name: TypeScript Compile name: TypeScript Compile
command: pnpm run build command: pnpm run build