From d1b9653b224e92d62b8a8962d36ea0b97f27bcec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Ro=C5=BCnawski?= Date: Tue, 3 Oct 2023 13:49:46 +0200 Subject: [PATCH 1/2] Use cimg image. --- .circleci/config.yml | 28 ++++++++++++---------------- docker-compose-test.yaml | 6 ++---- pyproject.toml | 2 +- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5e9da1b..533384d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,33 +1,29 @@ version: 2.1 +orbs: + poetry: talkiq/poetry@4.0.1 + executors: - machine_executor_amd64: - machine: - image: ubuntu-2204:2022.04.2 - environment: - architecture: "amd64" - platform: "linux/amd64" + machine_executor_amd64: + machine: + image: ubuntu-2204:2022.04.2 + environment: + architecture: "amd64" + platform: "linux/amd64" jobs: lint: docker: - - image: python:3.8.18-slim-bullseye + - image: cimg/python:3.8 steps: - checkout - run: - name: Install deps - command: apt update && apt upgrade && apt install -y curl gcc libc-dev libffi-dev - - run: - name: Install poetry - command: "curl -sSL https://install.python-poetry.org | python3 - && \ - echo 'export PATH=/root/.local/bin:${PATH}' >> \"$BASH_ENV\" && \ - source \"$BASH_ENV\"" - - run: - name: Install project dependencies + name: Project deps command: poetry install --no-ansi - run: name: Lint command: ./pylint.sh + - persist_to_workspace: root: ~/project paths: diff --git a/docker-compose-test.yaml b/docker-compose-test.yaml index f729e64..fb7669a 100644 --- a/docker-compose-test.yaml +++ b/docker-compose-test.yaml @@ -29,10 +29,8 @@ services: - network test: - image: python:3.8-alpine3.18 - command: sh -c "cd app/ && apk add curl gcc libc-dev libffi-dev && \ - curl -sSL https://install.python-poetry.org | python3 - && \ - export PATH=\"/root/.local/bin:$PATH\" && \ + image: cimg/python:3.8 + command: sh -c "cd /app && sudo apt update && sudo apt install curl gcc libc-dev libffi-dev && \ poetry config virtualenvs.in-project false && \ poetry install --no-ansi && \ poetry run pytest -s" diff --git a/pyproject.toml b/pyproject.toml index d75b9dc..e038f0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,5 +25,5 @@ pytest = "^7.4.2" pytest-asyncio = "^0.21.1" [build-system] -requires = ["poetry-core"] +requires = ["poetry-core^1.7.0"] build-backend = "poetry.core.masonry.api" From cf568dd84975b51e9b33071a5d4051638c5c8e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Ro=C5=BCnawski?= Date: Tue, 3 Oct 2023 16:30:20 +0200 Subject: [PATCH 2/2] Remove unused --- .circleci/config.yml | 4 ---- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 533384d..6258886 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,5 @@ version: 2.1 -orbs: - poetry: talkiq/poetry@4.0.1 - executors: machine_executor_amd64: machine: @@ -23,7 +20,6 @@ jobs: - run: name: Lint command: ./pylint.sh - - persist_to_workspace: root: ~/project paths: diff --git a/pyproject.toml b/pyproject.toml index e038f0f..7ef8e1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,5 +25,5 @@ pytest = "^7.4.2" pytest-asyncio = "^0.21.1" [build-system] -requires = ["poetry-core^1.7.0"] +requires = ["poetry-core^1.6.0"] build-backend = "poetry.core.masonry.api"