Skip to content

Commit ec4878e

Browse files
authored
Merge pull request #13645 from afeddersen/apt
Add 7 Python package tests - #1
2 parents d80081f + bd56c02 commit ec4878e

File tree

7 files changed

+134
-1
lines changed

7 files changed

+134
-1
lines changed

py3-build.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,22 @@ update:
4444
identifier: pypa/build
4545
use-tag: true
4646
strip-suffix: .post1
47+
48+
test:
49+
environment:
50+
contents:
51+
packages:
52+
- busybox
53+
pipeline:
54+
- runs: |
55+
LIBRARY="build"
56+
IMPORT_STATEMENT="import build"
57+
58+
if ! python -c "$IMPORT_STATEMENT"; then
59+
echo "Failed to import library '$LIBRARY'."
60+
python -c "$IMPORT_STATEMENT" 2>&1
61+
exit 1
62+
else
63+
echo "Library '$LIBRARY' is installed and can be imported successfully."
64+
exit 0
65+
fi

py3-cachecontrol.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,22 @@ update:
4343
use-tag: true
4444
tag-filter: v
4545
strip-prefix: v
46+
47+
test:
48+
environment:
49+
contents:
50+
packages:
51+
- busybox
52+
pipeline:
53+
- runs: |
54+
LIBRARY="cachecontrol"
55+
IMPORT_STATEMENT="import cachecontrol"
56+
57+
if ! python -c "$IMPORT_STATEMENT"; then
58+
echo "Failed to import library '$LIBRARY'."
59+
python -c "$IMPORT_STATEMENT" 2>&1
60+
exit 1
61+
else
62+
echo "Library '$LIBRARY' is installed and can be imported successfully."
63+
exit 0
64+
fi

py3-cachetools.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,22 @@ update:
3838
enabled: true
3939
github:
4040
identifier: tkem/cachetools
41+
42+
test:
43+
environment:
44+
contents:
45+
packages:
46+
- busybox
47+
pipeline:
48+
- runs: |
49+
LIBRARY="cachetools"
50+
IMPORT_STATEMENT="from cachetools import TTLCache"
51+
52+
if ! python -c "$IMPORT_STATEMENT"; then
53+
echo "Failed to import library '$LIBRARY'."
54+
python -c "$IMPORT_STATEMENT" 2>&1
55+
exit 1
56+
else
57+
echo "Library '$LIBRARY' is installed and can be imported successfully."
58+
exit 0
59+
fi

py3-cairo.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,22 @@ update:
5656
github:
5757
identifier: pygobject/pycairo
5858
strip-prefix: v
59+
60+
test:
61+
environment:
62+
contents:
63+
packages:
64+
- busybox
65+
pipeline:
66+
- runs: |
67+
LIBRARY="cairo"
68+
IMPORT_STATEMENT="import cairo"
69+
70+
if ! python -c "$IMPORT_STATEMENT"; then
71+
echo "Failed to import library '$LIBRARY'."
72+
python -c "$IMPORT_STATEMENT" 2>&1
73+
exit 1
74+
else
75+
echo "Library '$LIBRARY' is installed and can be imported successfully."
76+
exit 0
77+
fi

py3-canonicaljson.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,22 @@ update:
3737
identifier: matrix-org/python-canonicaljson
3838
strip-prefix: v
3939
use-tag: true
40+
41+
test:
42+
environment:
43+
contents:
44+
packages:
45+
- busybox
46+
pipeline:
47+
- runs: |
48+
LIBRARY="canonicaljson"
49+
IMPORT_STATEMENT="import canonicaljson"
50+
51+
if ! python -c "$IMPORT_STATEMENT"; then
52+
echo "Failed to import library '$LIBRARY'."
53+
python -c "$IMPORT_STATEMENT" 2>&1
54+
exit 1
55+
else
56+
echo "Library '$LIBRARY' is installed and can be imported successfully."
57+
exit 0
58+
fi

py3-certifi.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package:
22
name: py3-certifi
33
version: 2024.02.02
44
epoch: 1
5-
description: "Python3 package for providing Mozilla's CA Bundle"
5+
description: Python3 package for providing Mozilla's CA Bundle
66
copyright:
77
- license: MPL-2.0
88
dependencies:
@@ -59,3 +59,22 @@ update:
5959
identifier: certifi/python-certifi
6060
strip-prefix: v
6161
use-tag: true
62+
63+
test:
64+
environment:
65+
contents:
66+
packages:
67+
- busybox
68+
pipeline:
69+
- runs: |
70+
LIBRARY="certifi"
71+
IMPORT_STATEMENT="import certifi"
72+
73+
if ! python -c "$IMPORT_STATEMENT"; then
74+
echo "Failed to import library '$LIBRARY'."
75+
python -c "$IMPORT_STATEMENT" 2>&1
76+
exit 1
77+
else
78+
echo "Library '$LIBRARY' is installed and can be imported successfully."
79+
exit 0
80+
fi

py3-cffi.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,22 @@ update:
4141
enabled: true
4242
release-monitor:
4343
identifier: 5536
44+
45+
test:
46+
environment:
47+
contents:
48+
packages:
49+
- busybox
50+
pipeline:
51+
- runs: |
52+
LIBRARY="cffi"
53+
IMPORT_STATEMENT="import cffi"
54+
55+
if ! python -c "$IMPORT_STATEMENT"; then
56+
echo "Failed to import library '$LIBRARY'."
57+
python -c "$IMPORT_STATEMENT" 2>&1
58+
exit 1
59+
else
60+
echo "Library '$LIBRARY' is installed and can be imported successfully."
61+
exit 0
62+
fi

0 commit comments

Comments
 (0)