@@ -4,63 +4,56 @@ executors:
44 python-executor :
55 working_directory : ~/phovea-python
66 docker :
7- - image : circleci/python:3.7 -buster-node-browsers # for node version see Dockerfile on https://hub.docker.com/r/circleci/python
7+ - image : circleci/python:3.10 -buster
88 node-executor :
99 working_directory : ~/phovea-web
1010 docker :
11- - image : circleci/node:12.13 -buster-browsers
11+ - image : circleci/node:14.17 -buster
1212
1313jobs :
1414 python-build :
1515 executor : python-executor
1616 steps :
1717 - checkout
18- - run :
19- name : Show Node.js and npm version
20- command : |
21- node -v
22- npm -v
23- - run :
24- name : Show Python and pip version
25- command : |
26- python --version
27- pip --version
28- - run :
29- name : Install Docker packages from docker_packages.txt
30- command : |
31- (!(test -f docker_packages.txt) || (cat docker_packages.txt | xargs sudo apt-get install -y))
3218 - restore_cache :
33- key : deps1 -{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_dev.txt" }}
19+ key : deps -{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_dev.txt" }}
3420 - run :
3521 name : Install pip requirements
3622 command : |
3723 virtualenv ~/venv
3824 . ~/venv/bin/activate
39- pip install -r requirements_dev.txt
40- pip install -r requirements.txt
25+ make develop
4126 - save_cache :
42- key : deps1 -{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_dev.txt" }}
27+ key : deps -{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_dev.txt" }}
4328 paths :
4429 - ~/venv
4530 - run :
4631 name : Force an update of pip dependencies from git repositories # not sure if this is working ?
4732 command : |
4833 . ~/venv/bin/activate
49- pip install --upgrade --upgrade-strategy=only-if-needed -r requirements.txt
34+ pip install --upgrade --upgrade-strategy=only-if-needed -e .[develop]
5035 - run :
5136 name : Show installed pip packages
52- command : pip list || true
37+ command : |
38+ . ~/venv/bin/activate
39+ pip list || true
5340 - run :
54- name : Remove all from dist folder
41+ name : Linting
5542 command : |
56- rm -rf dist && mkdir dist
43+ . ~/venv/bin/activate
44+ make lint check-format
5745 - run :
58- name : Build
46+ name : Run tests
5947 command : |
6048 . ~/venv/bin/activate
61- npm run dist:python
49+ make test
50+ - run :
51+ name : Build wheel
52+ command : |
53+ . ~/venv/bin/activate
54+ make build
6255 - store_artifacts :
63- path : dist
56+ path : dist_python
6457 destination : dist-python
6558 - persist_to_workspace :
6659 root : ~/.
7568 node -v
7669 npm -v
7770 - restore_cache :
78- key : deps2 -{{ .Branch }}-{{ checksum "package.json" }}
71+ key : deps0 -{{ .Branch }}-{{ checksum "package.json" }}
7972 - run :
8073 name : Install npm dependencies
8174 command : npm install
8477 command : |
8578 (grep -l '._resolved.: .\(git[^:]*\|bitbucket\):' ./node_modules/*/package.json || true) | xargs -r dirname | xargs -r rm -rf
8679 - save_cache :
87- key : deps2 -{{ .Branch }}-{{ checksum "package.json" }}
80+ key : deps0 -{{ .Branch }}-{{ checksum "package.json" }}
8881 paths : ./node_modules
8982 - run :
9083 name : Install npm dependencies from git repositories (always get latest commit)
9487 command : npm list --depth=1 || true
9588 - run :
9689 name : Build
97- command : npm run dist:web
90+ command : npm run dist
9891 - store_artifacts :
9992 path : dist
10093 destination : dist-web
0 commit comments