Skip to content

Commit 25df52d

Browse files
author
Gonzalo Diaz
committed
[BUGFIX] sonarcloud: Omitting "--only-binary :all:" can lead to the execution of setup scripts. Make sure it is safe here.
1 parent 054e331 commit 25df52d

8 files changed

Lines changed: 33 additions & 171 deletions

File tree

.github/workflows/python-coverage.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ jobs:
4444
4545
- name: Test an coverage collect
4646
run: >
47-
python3 -m coverage run -m pytest --verbose
47+
pipenv run coverage run -m pytest --verbose
4848
-o log_cli=true
4949
--log-cli-level=INFO
5050
src/
5151
5252
- name: Coverage Report
5353
run: |
54-
python3 -m coverage report
54+
pipenv run coverage report
5555
5656
- name: Coverage lcov (codecov)
5757
run: |
58-
python3 -m coverage lcov -o coverage/lcov.info
58+
pipenv run coverage lcov -o coverage/lcov.info
5959
6060
- name: Coverage xml (sonarcloud)
6161
run: |
62-
python3 -m coverage xml -o coverage/coverage.xml
62+
pipenv run coverage xml -o coverage/coverage.xml
6363
6464
- name: Upload coverage artifact
6565
uses: actions/upload-artifact@v7

.github/workflows/python-lint.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Install tooling on Windows
4343
if: runner.os == 'Windows'
4444
run: |
45-
choco install pipenv -y
45+
python -m pip install --user pipenv==2026.6.1
4646
shell: pwsh
4747

4848
- name: Tooling check
@@ -58,20 +58,20 @@ jobs:
5858
5959
- name: Lint (pylint)
6060
run: |
61-
pylint --verbose --recursive yes src/
61+
pipenv run pylint --verbose --recursive yes src/
6262
6363
- name: Lint (flake8)
6464
run: |
65-
python3 -m flake8 --verbose src/
65+
pipenv run flake8 --verbose src/
6666
6767
- name: Lint (pyright) static type checker
6868
run: |
69-
python3 -m pyright --verbose src/
69+
pipenv run pyright --verbose src/
7070
7171
- name: Styling (pycodestyle)
7272
run: |
73-
python3 -m pycodestyle --statistics src/
73+
pipenv run pycodestyle --statistics src/
7474
7575
- name: Styling (autopep8)
7676
run: |
77-
python3 -m autopep8 --diff --recursive --exit-code --verbose .
77+
pipenv run autopep8 --diff --recursive --exit-code --verbose .

.github/workflows/python-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Install tooling on Windows
4646
if: runner.os == 'Windows'
4747
run: |
48-
choco install pipenv -y
48+
python -m pip install --user pipenv==2026.6.1
4949
shell: pwsh
5050

5151
- name: Tooling check
@@ -61,11 +61,11 @@ jobs:
6161
6262
- name: Test
6363
run: >
64-
coverage run -m pytest --verbose
64+
pipenv run coverage run -m pytest --verbose
6565
-o log_cli=true
6666
--log-cli-level=INFO
6767
src/
6868
6969
- name: Coverage
7070
run: |
71-
coverage report
71+
pipenv run coverage report

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ RUN apk add --update --no-cache make \
1313
FROM init AS base
1414

1515
ENV WORKDIR=/app
16+
ENV LANG=C.UTF-8
1617
WORKDIR ${WORKDIR}
1718

1819
COPY ./Makefile ${WORKDIR}/
19-
COPY ./requirements.txt ${WORKDIR}/
20-
RUN make dependencies
20+
COPY Pipfile ${WORKDIR}/
21+
COPY Pipfile.lock ${WORKDIR}/
22+
23+
RUN python -m pip install --no-cache-dir --root-user-action=ignore pipenv==2026.6.1
24+
RUN pipenv sync --dev --python=$(which python)
2125

2226
###############################################################################
2327
FROM base AS lint

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,37 +112,37 @@ format/json:
112112
prettier --write ./src/**/*.json
113113

114114
format/sources:
115-
${RUNTIME_TOOL} -m autopep8 --in-place --recursive --aggressive --aggressive --verbose src/
115+
${PACKAGE_TOOL} run autopep8 --in-place --recursive --aggressive --aggressive --verbose src/
116116

117117
format: format/sources format/json
118118

119119
## Static code analysis
120120
test/static: dependencies
121-
${RUNTIME_TOOL} -m pylint --verbose --recursive yes src/
122-
${RUNTIME_TOOL} -m flake8 --verbose src/
123-
${RUNTIME_TOOL} -m pyright --verbose src/
121+
${PACKAGE_TOOL} run pylint --verbose --recursive yes src/
122+
${PACKAGE_TOOL} run flake8 --verbose src/
123+
${PACKAGE_TOOL} run pyright --verbose src/
124124

125125
test/styling: dependencies
126-
${RUNTIME_TOOL} -m pycodestyle --statistics src/
127-
${RUNTIME_TOOL} -m autopep8 --diff --recursive --exit-code --verbose .
126+
${PACKAGE_TOOL} run pycodestyle --statistics src/
127+
${PACKAGE_TOOL} run autopep8 --diff --recursive --exit-code --verbose .
128128

129129
## Unit tests and coverage
130130
test: env dependencies
131-
${RUNTIME_TOOL} -m coverage run -m \
131+
${PACKAGE_TOOL} run coverage run -m \
132132
pytest --verbose \
133133
-o log_cli=true \
134134
--log-cli-level=${LOG_LEVEL} \
135135
--full-trace src/
136-
${RUNTIME_TOOL} -m coverage report
136+
${PACKAGE_TOOL} run coverage report
137137

138138
coverage: test
139-
${RUNTIME_TOOL} -m coverage lcov -o coverage/lcov.info
139+
${PACKAGE_TOOL} run coverage lcov -o coverage/lcov.info
140140

141141
coverage/xml: test
142-
${RUNTIME_TOOL} -m coverage xml -o coverage/coverage.xml
142+
${PACKAGE_TOOL} run coverage xml -o coverage/coverage.xml
143143

144144
coverage/html: test
145-
${RUNTIME_TOOL} -m coverage html
145+
${PACKAGE_TOOL} run coverage html
146146
open htmlcov/index.html
147147

148148
## Docker Compose commands

PIPENV_MIGRATION.md

Lines changed: 0 additions & 142 deletions
This file was deleted.

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ wrapt = "==2.1.2"
3535
zipp = ">=3.23.1"
3636

3737
[requires]
38-
python_version = "3.12"
38+
python_version = "3"

Pipfile.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)