Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add integration tests for pip wheels #504

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
environment_variables:
- name: PIP_FIND_LINKS
value: ${output_dir}/deps/pip
- name: PIP_NO_INDEX
value: 'true'
project_files: []
203 changes: 203 additions & 0 deletions tests/integration/test_data/pip_e2e_test_wheels/bom.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
{
"bomFormat": "CycloneDX",
"components": [
{
"name": "absl-py",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "2.1.0"
},
{
"name": "grpcio",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "1.64.0"
},
{
"name": "markdown",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "3.6"
},
{
"name": "markupsafe",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "2.1.5"
},
{
"name": "numpy",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "1.26.4"
},
{
"name": "package",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
}
],
"purl": "pkg:pypi/[email protected]?vcs_url=git%2Bhttps://github.com/cachito-testing/cachi2-pip-wheels%40eee59273542ee7d412fb359d471386b645cf166e",
"type": "library",
"version": "0.1.0"
},
{
"name": "protobuf",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "4.25.3"
},
{
"name": "setuptools",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "70.0.0"
},
{
"name": "six",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "1.16.0"
},
{
"name": "tensorboard-data-server",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "0.7.2"
},
{
"name": "tensorboard",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "2.16.2"
},
{
"name": "werkzeug",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
},
{
"name": "cachi2:pip:package:binary",
"value": "true"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "3.0.3"
}
],
"metadata": {
"tools": [
{
"name": "cachi2",
"vendor": "red hat"
}
]
},
"specVersion": "1.4",
"version": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM docker.io/python:3.11

# check network access
RUN if curl -IsS www.google.com; then echo "Has network access!"; exit 1; fi

# check source code
RUN cat /tmp/cachi2.env
RUN ls /tmp/pip_e2e_test_wheels-output/deps/pip
RUN ls /tmp/pip_e2e_test_wheels-source

WORKDIR /tmp/pip_e2e_test_wheels-source

# install packages
RUN . /tmp/cachi2.env && pip install -r requirements.txt
RUN cp /tmp/pip_e2e_test_wheels-source/package/main.py /opt/package

Loading