Skip to content

Commit

Permalink
fix: upgrade Python 3.8 to 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jmpsf committed Jul 14, 2022
1 parent cbd2474 commit e3d257c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2.1

orbs:
Expand Down Expand Up @@ -26,7 +27,7 @@ workflows:
docker-password: DOCKER_PASS
docker-username: DOCKER_USER
image: icij/prophecies
tag: "${CIRCLE_TAG/#v},latest"
tag: ${CIRCLE_TAG/#v},latest
registry: registry.hub.docker.com
requires:
- test-frontend
Expand Down Expand Up @@ -60,13 +61,15 @@ jobs:
key: repository-cache-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
name: Restore node dependencies from previous builds
key: node-dependencies-cache-{{ .Branch }}-{{ checksum "prophecies/apps/frontend/package.json" }}
key: node-dependencies-cache-{{ .Branch }}-{{ checksum "prophecies/apps/frontend/package.json"
}}
- run:
name: Install node dependencies with yarn
command: yarn
- save_cache:
name: Save dependencies cache for future builds
key: node-dependencies-cache-{{ .Branch }}-{{ checksum "prophecies/apps/frontend/package.json" }}
key: node-dependencies-cache-{{ .Branch }}-{{ checksum "prophecies/apps/frontend/package.json"
}}
paths:
- ./prophecies/apps/frontend/node_modules/
- run:
Expand All @@ -78,25 +81,27 @@ jobs:

test-backend:
docker:
- image: circleci/python:3.8
- image: circleci/python:3.9
working_directory: ~/repository/
steps:
- restore_cache:
name: Restore app bundle repository from the `checkout` job
key: repository-cache-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
name: Restore virtualenvs from previous builds
key: virtualenvs-dependencies-cache-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
key: virtualenvs-dependencies-cache-{{ .Branch }}-{{ checksum "Pipfile.lock"
}}
- run:
name: Install pipenv and project's pip packages
command: |
sudo pip install pipenv
pipenv install --dev
- save_cache:
name: Save virtualenvs cache for future builds
key: virtualenvs-dependencies-cache-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
key: virtualenvs-dependencies-cache-{{ .Branch }}-{{ checksum "Pipfile.lock"
}}
paths:
- "~/.local/share/virtualenvs/"
- ~/.local/share/virtualenvs/
- run:
name: Run unit tests
command: pipenv run python manage.py test --settings=prophecies.settings.test
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY ./prophecies/apps/frontend/ /frontend/
RUN yarn
RUN yarn build

FROM python:3.8
FROM python:3.9

ENV PYTHONUNBUFFERED 1
ENV PORT 8008
Expand Down

0 comments on commit e3d257c

Please sign in to comment.