diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7e3785c0b2..7471c0b30d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,10 @@ jobs: steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Install Ubuntu packages - run: sudo apt-get -y install protobuf-compiler python3 + run: sudo apt-get -y install protobuf-compiler + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v.5.6.0 + with: + python-version: '3.11' - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: modified with: @@ -94,11 +97,13 @@ jobs: working-directory: ./quickwit - name: Install python packages if: always() && steps.modified.outputs.rust_src == 'true' - run: python3 -m venv venv && source venv/bin/activate && pip install pyaml requests + run: | + pip install --user pipenv==2025.0.4 + pipenv install --deploy --ignore-pipfile working-directory: ./quickwit/rest-api-tests - name: Run REST API tests if: always() && steps.modified.outputs.rust_src == 'true' - run: source venv/bin/activate && python3 ./run_tests.py --binary ../target/debug/quickwit + run: pipenv run python3 ./run_tests.py --binary ../target/debug/quickwit working-directory: ./quickwit/rest-api-tests lints: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 96aef979c29..f4ac79d4224 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -117,6 +117,10 @@ jobs: sudo apt install libsasl2-dev sudo apt install libsasl2-2 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v.5.6.0 + with: + python-version: '3.11' + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: | @@ -127,12 +131,15 @@ jobs: ${{ runner.os }}-cargo-test-${{ hashFiles('Cargo.lock') }} ${{ runner.os }}-cargo-test - - name: Install awslocal - run: pip install awscli-local + - name: Install python packages + run: | + pip install --user pipenv==2025.0.4 + pipenv install --deploy --ignore-pipfile + working-directory: ./quickwit/quickwit-cli/tests - name: Prepare LocalStack S3 - run: ./quickwit-cli/tests/prepare_tests.sh - working-directory: ./quickwit + run: pipenv run ./prepare_tests.sh + working-directory: ./quickwit/quickwit-cli/tests # GitHub Actions does not allow services to be started with a custom command, # so we are running Azurite as a container manually. diff --git a/quickwit/quickwit-cli/tests/Pipfile b/quickwit/quickwit-cli/tests/Pipfile new file mode 100644 index 00000000000..f7a61075c69 --- /dev/null +++ b/quickwit/quickwit-cli/tests/Pipfile @@ -0,0 +1,12 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +awscli-local = "*" + +[dev-packages] + +[requires] +python_version = "3.11" diff --git a/quickwit/quickwit-cli/tests/Pipfile.lock b/quickwit/quickwit-cli/tests/Pipfile.lock new file mode 100644 index 00000000000..483b870bc16 --- /dev/null +++ b/quickwit/quickwit-cli/tests/Pipfile.lock @@ -0,0 +1,91 @@ +{ + "_meta": { + "hash": { + "sha256": "a267110298185b224bf2b9b6f5c887a813d38c8866cc8396db4ab2fdffb1a32d" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.11" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "awscli-local": { + "hashes": [ + "sha256:07c532c372753bf5f15426451dc91d6eec9de8779748049329a9a882bdac8a0b", + "sha256:1901ebef343ba8cbde06f9f6406b5415ef53e93296718c2c31c9d49b0b09bd9d" + ], + "index": "pypi", + "version": "==0.22.2" + }, + "boto3": { + "hashes": [ + "sha256:75752e7dc445131700a58926a50ca705794232f0f47d0e21edb59fbf1898db95", + "sha256:b1a5a203511e594872b39a129365f02eb5846eea990629e8daf47a3c01e7fd49" + ], + "markers": "python_version >= '3.9'", + "version": "==1.40.59" + }, + "botocore": { + "hashes": [ + "sha256:042dd844ca82155ca1ab9608b9bef36d517515c775d075f57b89257108ae843b", + "sha256:842a466d8735272a30fe5b7f97df559d9e211a18e412f62a17ed249fd62f85fe" + ], + "markers": "python_version >= '3.9'", + "version": "==1.40.59" + }, + "jmespath": { + "hashes": [ + "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980", + "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + ], + "markers": "python_version >= '3.7'", + "version": "==1.0.1" + }, + "localstack-client": { + "hashes": [ + "sha256:732a07e23fffd6a581af2714bbe006ad6f884ac4f8ac955211a8a63321cdc409" + ], + "version": "==2.10" + }, + "python-dateutil": { + "hashes": [ + "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", + "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==2.9.0.post0" + }, + "s3transfer": { + "hashes": [ + "sha256:ea3b790c7077558ed1f02a3072fb3cb992bbbd253392f4b6e9e8976941c7d456", + "sha256:eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125" + ], + "markers": "python_version >= '3.9'", + "version": "==0.14.0" + }, + "six": { + "hashes": [ + "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", + "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==1.17.0" + }, + "urllib3": { + "hashes": [ + "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760", + "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc" + ], + "markers": "python_version >= '3.9'", + "version": "==2.5.0" + } + }, + "develop": {} +}