Skip to content

Commit

Permalink
circleci updates (#1122)
Browse files Browse the repository at this point in the history
* use uv in circleci

* use python 3.12 in circleci
  • Loading branch information
bmos authored Sep 6, 2024
1 parent 81f622c commit 30be14b
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,60 +20,62 @@ jobs:
# Documentation CI
docs-build:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.12
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
- v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-python3.10-
- v2-dependencies-python3.12-
- run:
name: Install dependencies
# Note that we the circleci node image installs stuff with a user "circleci", rather
# than root. So we need to tell npm where to install stuff.
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r ./docs/requirements.txt
pip install uv
uv venv
source .venv/bin/activate
uv pip install -r ./docs/requirements.txt
- save_cache:
paths:
- ./venv
key: v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
key: v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }}
- run:
name: Build docs
command: |
. venv/bin/activate
source .venv/bin/activate
cd docs/
make deploy_docs
cd ..
docs-build-deploy:
docker:
- image: cimg/python:3.10-node
- image: cimg/python:3.12-node
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
- v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-python3.10-
- v2-dependencies-python3.12-
- run:
name: Install dependencies
# Note that we the circleci node image installs stuff with a user "circleci", rather
# than root. So we need to tell npm where to install stuff.
command: |
npm set prefix=/home/circleci/npm
npm install -g --silent [email protected]
python3 -m venv venv
. venv/bin/activate
pip install -r ./docs/requirements.txt
pip install uv
uv venv
source .venv/bin/activate
uv pip install -r ./docs/requirements.txt
- save_cache:
paths:
- ./venv
key: v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
key: v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }}
- add_ssh_keys:
# This SSH key is "CircleCI Docs" in https://github.com/move-coop/parsons/settings/keys
# We need write access to the Parsons repo, so we can push the "gh-pages" branch.
Expand All @@ -85,7 +87,7 @@ jobs:
# (This file tell Github Pages that we want to include all files in docs/, including those
# that start with an underscore like _static/).
command: |
. venv/bin/activate
source .venv/bin/activate
cd docs/
make deploy_docs
cd ..
Expand Down

0 comments on commit 30be14b

Please sign in to comment.