Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ commands:
bootstrap:
description: "bootstrap"
steps:
- restore_cache:
keys:
- bootstrap-node-deps-{{ arch }}-{{ checksum "package-lock.json" }}
- run: ./bootstrap
- save_cache:
key: bootstrap-node-deps-{{ arch }}-{{ checksum "package-lock.json" }}
paths:
- node_modules
pip-install:
description: "pip install"
parameters:
Expand All @@ -66,9 +73,22 @@ commands:
type: string
default: python3
steps:
- restore_cache:
keys:
- python-deps-v2-{{ arch }}-checksum "requirements-dev.txt" }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why v2 here?

- run:
name: pip install
command: << parameters.python >> -m pip install -r requirements-dev.txt
command: |
if [[ -e ~/.cache/pip ]]; then
echo "Skipping npm ci due to cache hit"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If everything is already there, isn't npm ci just a no-op that runs fast?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, actually this is pip, so the echo should be updated. but same question. i.e. could we just run the command anyway.

else
<< parameters.python >> -m pip install -r requirements-dev.txt
fi
- save_cache:
key: python-deps-v2-{{ arch }}-{{ checksum "requirements-dev.txt" }}
paths:
- ~/.cache/pip
- ~/.local/bin
install-rust:
steps:
- run:
Expand Down Expand Up @@ -557,10 +577,24 @@ jobs:
executor: linux-node
steps:
- checkout
- run: npm ci
- restore_cache:
keys:
- node-deps-{{ arch }}-{{ checksum "package-lock.json" }}
- run:
name: npm ci
command: |
if [[ -e node_modules ]]; then
echo "Skipping npm ci due to cache hit"
else
npm ci
fi
- run: |
npm run lint
npm run check
- save_cache:
key: node-deps-{{ arch }}-{{ checksum "package-lock.json" }}
paths:
- node_modules
test-sanity:
executor: ubuntu-lts
steps:
Expand Down