Skip to content

Commit da8a648

Browse files
authored
Pin Python packages in workflows. See #5937 (#5949)
* Pin Python packages in workflows. See #5937 * Update CI workflow to use pipenv * Update coverage workflow to use pipenv * Pin pipenv version
1 parent 449cb64 commit da8a648

File tree

4 files changed

+122
-7
lines changed

4 files changed

+122
-7
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ jobs:
5454
steps:
5555
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5656
- name: Install Ubuntu packages
57-
run: sudo apt-get -y install protobuf-compiler python3
57+
run: sudo apt-get -y install protobuf-compiler
58+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v.5.6.0
59+
with:
60+
python-version: '3.11'
5861
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
5962
id: modified
6063
with:
@@ -94,11 +97,13 @@ jobs:
9497
working-directory: ./quickwit
9598
- name: Install python packages
9699
if: always() && steps.modified.outputs.rust_src == 'true'
97-
run: python3 -m venv venv && source venv/bin/activate && pip install pyaml requests
100+
run: |
101+
pip install --user pipenv==2025.0.4
102+
pipenv install --deploy --ignore-pipfile
98103
working-directory: ./quickwit/rest-api-tests
99104
- name: Run REST API tests
100105
if: always() && steps.modified.outputs.rust_src == 'true'
101-
run: source venv/bin/activate && python3 ./run_tests.py --binary ../target/debug/quickwit
106+
run: pipenv run python3 ./run_tests.py --binary ../target/debug/quickwit
102107
working-directory: ./quickwit/rest-api-tests
103108

104109
lints:

.github/workflows/coverage.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ jobs:
117117
sudo apt install libsasl2-dev
118118
sudo apt install libsasl2-2
119119
120+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v.5.6.0
121+
with:
122+
python-version: '3.11'
123+
120124
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
121125
with:
122126
path: |
@@ -127,12 +131,15 @@ jobs:
127131
${{ runner.os }}-cargo-test-${{ hashFiles('Cargo.lock') }}
128132
${{ runner.os }}-cargo-test
129133
130-
- name: Install awslocal
131-
run: pip install awscli-local
134+
- name: Install python packages
135+
run: |
136+
pip install --user pipenv==2025.0.4
137+
pipenv install --deploy --ignore-pipfile
138+
working-directory: ./quickwit/quickwit-cli/tests
132139

133140
- name: Prepare LocalStack S3
134-
run: ./quickwit-cli/tests/prepare_tests.sh
135-
working-directory: ./quickwit
141+
run: pipenv run ./prepare_tests.sh
142+
working-directory: ./quickwit/quickwit-cli/tests
136143

137144
# GitHub Actions does not allow services to be started with a custom command,
138145
# so we are running Azurite as a container manually.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
awscli-local = "*"
8+
9+
[dev-packages]
10+
11+
[requires]
12+
python_version = "3.11"

quickwit/quickwit-cli/tests/Pipfile.lock

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

0 commit comments

Comments
 (0)