File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,9 @@ analysis_task:
83
83
name : " SC Analysis"
84
84
analysis_script :
85
85
- poetry run pytest --cov-report=xml:coverage.xml --cov-config=pyproject.toml --cov=src --cov-branch tests
86
- - python -m venv . venv
86
+ - uv venv
87
87
- source .venv/bin/activate
88
- - pip install .
88
+ - uv pip install .
89
89
- pysonar-scanner -Dsonar.organization=sonarsource -DbuildNumber=${CI_BUILD_NUMBER}
90
90
always :
91
91
pytest_artifacts :
Original file line number Diff line number Diff line change 1
1
ARG CIRRUS_AWS_ACCOUNT=275878209202
2
2
FROM ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
3
-
4
3
USER root
5
-
6
4
ARG PYTHON_VERSION=3.12.1
7
5
ENV POETRY_VERSION 2.0.1
8
6
9
- # install required dependencies to build Python from source see: https://devguide.python.org/getting-started/setup-building/#install-dependencies
10
- RUN apt-get update && apt-get install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev
11
- RUN curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz
12
- RUN tar -xf Python-${PYTHON_VERSION}.tar.xz
13
- RUN cd Python-${PYTHON_VERSION} && ./configure && make -s -j 4 && make altinstall
14
- RUN cd /usr/local/bin \
15
- && ln -s python${PYTHON_VERSION%.*} python \
16
- && ln -s python${PYTHON_VERSION%.*} python3 \
17
- && ln -s pip${PYTHON_VERSION%.*} pip \
18
- && ln -s pip${PYTHON_VERSION%.*} pip3
19
-
7
+ RUN apt-get update && \
8
+ apt-get install -y pipx \
9
+ && rm -rf /var/lib/apt/lists/*
20
10
USER sonarsource
21
-
22
- RUN curl -sSL https://install.python-poetry.org | python3 -
23
- ENV PATH= "${PATH}: /home/sonarsource/.local/bin"
24
-
25
- ENV SONARCLOUD_ANALYSIS true
11
+ RUN pipx install uv
12
+ ENV PATH=${PATH}:/home/sonarsource/.local/bin
13
+ WORKDIR /home/sonarsource
14
+ RUN uv python install ${PYTHON_VERSION} --default --preview && \
15
+ uv tool install poetry==${POETRY_VERSION}
You can’t perform that action at this time.
0 commit comments