-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve CI Setup #681
Merged
Merged
Improve CI Setup #681
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
3c8e6ca
Conda info
limdauto 71249bb
Cache build
limdauto 59a0146
Fix pip
limdauto 6dd7cb2
Fix
limdauto 9d70333
Install vevn
limdauto 7072a70
Python 3.8
limdauto 6e9cd5e
add-app-repository
limdauto beeadeb
Use cimg
limdauto 98d9655
Fix
limdauto ebe808e
Use default python
limdauto 006fb29
Echo python version
limdauto 51787f8
Revert
limdauto 3948a60
Revert
limdauto 72658c9
Typo
limdauto f069c14
Cache pip
limdauto 55014e8
Make parallel
limdauto acae28c
Run command in parallel
limdauto 0aa811a
Wait
limdauto a6c5378
Amend
limdauto 78ab36b
Only create if not exist
limdauto e88de0c
Amend
limdauto 6c2ae85
Remove ci.js
limdauto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,36 +6,28 @@ orbs: | |
executors: | ||
circleci_machine: | ||
docker: | ||
- image: circleci/node:14.15 | ||
- image: cimg/node:14.15 | ||
working_directory: ~/repo | ||
|
||
commands: | ||
setup_python_env: | ||
description: Setup Python environment | ||
steps: | ||
- run: | ||
name: Install python3 | ||
name: Install python3.8 | ||
command: | | ||
sudo apt-get install software-properties-common | ||
sudo add-apt-repository ppa:deadsnakes/ppa -y | ||
sudo apt update | ||
sudo apt install python3 python3-pip | ||
sudo apt install python3.8 python3-pip python3-venv | ||
- run: | ||
name: Install Python environment | ||
command: | | ||
# Get rid of pyenv stuff | ||
sudo rm -rf .pyenv/ /opt/circleci/.pyenv/ | ||
# Download and install miniconda | ||
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > miniconda.sh | ||
bash miniconda.sh -b -p $HOME/miniconda | ||
# Create an anaconda virtualenv for python ${CONDA_ENV_PY_VERSION} and make that the default python interpreter | ||
echo ". /home/circleci/miniconda/etc/profile.d/conda.sh" >> $BASH_ENV | ||
echo "conda deactivate; conda activate kedro-viz" >> $BASH_ENV | ||
. /home/circleci/miniconda/etc/profile.d/conda.sh | ||
conda create --name kedro-viz python=${CONDA_ENV_PY_VERSION} -y | ||
source $BASH_ENV | ||
mkdir -p /home/circleci/.venvs && python3 -m venv /home/circleci/.venvs/kedro-viz | ||
echo "source /home/circleci/.venvs/kedro-viz/bin/activate" >> $BASH_ENV | ||
- run: | ||
name: Install Kedro-Viz dependencies | ||
name: Install Python dependencies | ||
command: | | ||
python -m pip install -U pip setuptools wheel | ||
pip install git+https://github.com/quantumblacklabs/kedro@main | ||
cd package && pip install -r requirements.txt -U | ||
pip install -r test_requirements.txt -U | ||
|
@@ -51,7 +43,7 @@ commands: | |
steps: | ||
- run: | ||
name: Install Node dependencies | ||
command: node tools/ci.js | ||
command: npm install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can delete the |
||
|
||
test_lib_transpilation: | ||
steps: | ||
|
@@ -174,18 +166,24 @@ commands: | |
git commit -m 'Demo build [ci skip]' | ||
git remote add origin https://github.com/quantumblacklabs/kedro-viz.git | ||
git push origin gh-pages --force | ||
build: | ||
description: Run build | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v${CACHE_VERSION}-dependencies-{{ checksum "package.json" }} | ||
- v${CACHE_VERSION}-dependencies-{{ checksum "package.json" }}-{{ checksum "package/requirements.txt" }}-{{ checksum "package/test_requirements.txt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v${CACHE_VERSION}-dependencies- | ||
- setup_python_env | ||
- install_node_dependencies | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
- /home/circleci/.venvs/kedro-viz | ||
- /home/circleci/.cache/pip/ | ||
key: v${CACHE_VERSION}-dependencies-{{ checksum "package.json" }}-{{ checksum "package/requirements.txt" }}-{{ checksum "package/test_requirements.txt" }} | ||
- test_lib_transpilation | ||
- test_lib_import | ||
- run_eslint | ||
|
@@ -196,10 +194,6 @@ commands: | |
- run_python_tests | ||
- run_e2e_tests | ||
- cleanup | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v${CACHE_VERSION}-dependencies-{{ checksum "package.json" }} | ||
- build_npm_package | ||
- package_app | ||
|
||
|
@@ -215,10 +209,11 @@ commands: | |
- run: | ||
name: Create 'kedro-viz' conda environment | ||
command: | | ||
conda create --name kedro-viz python=$env:CONDA_ENV_PY_VERSION -y | ||
$condaEnvPath = "c:\tools\miniconda3\envs\kedro-viz\" | ||
if (-not (Test-Path $condaEnvPath)) { conda create --name kedro-viz python=$env:CONDA_ENV_PY_VERSION -y } | ||
win_setup_requirements: | ||
description: Install Kedro-Viz dependencies | ||
description: Install Python dependencies | ||
steps: | ||
- run: | ||
name: Install Kedro-Viz dependencies | ||
|
@@ -239,9 +234,20 @@ commands: | |
description: Run build on Windows | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v${CACHE_VERSION}-dependencies-{{ checksum "package.json" }}-{{ checksum "package/requirements.txt" }}-{{ checksum "package/test_requirements.txt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v${CACHE_VERSION}-dependencies- | ||
- win_setup_conda | ||
- win_setup_requirements | ||
- install_node_dependencies | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
- c:\tools\miniconda3\envs\kedro-viz\ | ||
- c:\users\circleci\appdata\local\pip\cache\ | ||
key: v${CACHE_VERSION}-dependencies-{{ checksum "package.json" }}-{{ checksum "package/requirements.txt" }}-{{ checksum "package/test_requirements.txt" }} | ||
- run: | ||
name: Run Python unit tests | ||
command: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@limdauto this is more for my curiosity - I wonder why won't we need conda as the default python interpreter with the new setup? Is it becuase of the switch to use
cimg
?