11defaults : &defaults
22 parallelism : 1
33 shell : /bin/bash --login
4+ commands :
5+ set_node_version :
6+ description : " Set Node.js version"
7+ parameters :
8+ version :
9+ type : string
10+ steps :
11+ - run :
12+ name : Set Node.js version
13+ command : |
14+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
15+ export NVM_DIR="$HOME/.nvm"
16+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
17+ nvm install << parameters.version >>
18+ node --version
19+ echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
20+ echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
21+ echo 'nvm alias default << parameters.version >> > /dev/null' >> $BASH_ENV
22+ default_build :
423 steps :
524 - checkout
625 - run : mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
@@ -39,7 +58,7 @@ defaults: &defaults
3958 command : |
4059 # run "cat /etc/os-release" to view information about the OS
4160 # good article on how to install mongo, https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
42-
61+
4362 cat /etc/os-release
4463 set -x
4564 # ------ (2022-10-28) install libssl1.1 since mongo doesn't support Ubuntu 22.04 which has libssl v3
@@ -59,7 +78,7 @@ defaults: &defaults
5978 name : Install JS Dependencies
6079 command : |
6180 pushd $YARN_STATIC_DIR
62- yarn install --frozen-lockfile
81+ yarn install --frozen-lockfile $EXTRA_YARN_INSTALL_ARGS
6382 - save_cache :
6483 name : Save Yarn Package Cache
6584 key : yarn-packages-{{ checksum "notebooker/web/static/yarn.lock" }}
@@ -80,6 +99,11 @@ defaults: &defaults
8099 command : |
81100 pushd $YARN_STATIC_DIR
82101 yarn run bundle
102+ - run :
103+ name : JS tests
104+ command : |
105+ pushd $YARN_STATIC_DIR
106+ yarn test
83107 - run :
84108 name : Create and activate virtualenv
85109 command : |
@@ -183,7 +207,7 @@ defaults: &defaults
183207 - ./*/version.txt
184208 - ./*/changes.md
185209 - ./*/dist/*
186- version : 2
210+ version : 2.1
187211jobs :
188212 build_3_6 :
189213 environment :
@@ -197,6 +221,10 @@ jobs:
197221 working_directory : ~/notebooker_3_6
198222 docker :
199223 - image : cimg/python:3.6-node
224+ steps :
225+ - set_node_version :
226+ version : " 18"
227+ - default_build
200228 << : *defaults
201229 build_3_7 :
202230 environment :
@@ -210,6 +238,8 @@ jobs:
210238 docker :
211239 - image : cimg/python:3.7-node
212240 << : *defaults
241+ steps :
242+ - default_build
213243 build_3_8 :
214244 environment :
215245 CIRCLE_ARTIFACTS : /tmp/circleci-artifacts/3_8
@@ -222,6 +252,8 @@ jobs:
222252 docker :
223253 - image : cimg/python:3.8-node
224254 << : *defaults
255+ steps :
256+ - default_build
225257 publish-github-release :
226258 docker :
227259 - image : cibuilds/github:0.13
0 commit comments