File tree Expand file tree Collapse file tree 1 file changed +23
-9
lines changed Expand file tree Collapse file tree 1 file changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,13 @@ aliases:
23
23
defaults : &defaults
24
24
working_directory : ~/algoliasearch-client-javascript
25
25
parameters :
26
- version :
26
+ cimg_version :
27
27
type : string
28
+ node_version :
29
+ type : string
30
+ default : ' '
28
31
docker :
29
- - image : cimg/node:<< parameters.version >>
32
+ - image : cimg/node:<< parameters.cimg_version >>
30
33
31
34
version : 2.1
32
35
jobs :
@@ -76,10 +79,19 @@ jobs:
76
79
command : yarn test:types
77
80
78
81
test_unit :
79
- description : Testing code against node << parameters.version >>
82
+ description : Testing code against node << parameters.node_version >>
80
83
<< : *defaults
81
84
steps :
82
85
- checkout
86
+ - run :
87
+ name : Install node version
88
+ command : |
89
+ if [ '<< parameters.node_version >>' ]; then
90
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash;
91
+ export NVM_DIR="$HOME/.nvm";
92
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh";
93
+ nvm install '<< parameters.node_version >>';
94
+ fi;
83
95
- run : *install_yarn_version
84
96
- restore_cache : *restore_yarn_cache
85
97
- run : *run_yarn_install
@@ -123,19 +135,21 @@ workflows:
123
135
ci :
124
136
jobs :
125
137
- test_unit :
126
- version : ' 8.17'
138
+ # workaround: cimg/node:8 certificate is unsigned, we use nvm instead
139
+ cimg_version : ' 14.17'
140
+ node_version : ' 8.17'
127
141
name : ' test_unit_8'
128
142
- test_unit :
129
- version : ' 14.17'
143
+ cimg_version : ' 14.17'
130
144
name : ' test_unit_14'
131
145
- test_lint :
132
- version : ' 12.22'
146
+ cimg_version : ' 12.22'
133
147
- test_types :
134
- version : ' 12.22'
148
+ cimg_version : ' 12.22'
135
149
- test_build :
136
- version : ' 12.16.2'
150
+ cimg_version : ' 12.16.2'
137
151
- test_browser :
138
- version : ' 12.16.2'
152
+ cimg_version : ' 12.16.2'
139
153
- release :
140
154
requires :
141
155
- test_unit_8
You can’t perform that action at this time.
0 commit comments