Skip to content

Commit

Permalink
Merge pull request #13588 from afeddersen/auto-package-test-2
Browse files Browse the repository at this point in the history
Python package tests
  • Loading branch information
afeddersen authored Feb 24, 2024
2 parents d545266 + 84c4e3a commit e132aba
Show file tree
Hide file tree
Showing 22 changed files with 350 additions and 22 deletions.
8 changes: 5 additions & 3 deletions py3-absl-py.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ test:
pipeline:
- runs: |
LIBRARY="absl"
OUTPUT=$(python -c "from $LIBRARY import app" 2>&1)
if echo "$OUTPUT" | grep -q "No module named"; then
echo "Failed to import library '$LIBRARY'. Please check if it is installed."
IMPORT_STATEMENT="from absl import app"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
Expand Down
8 changes: 5 additions & 3 deletions py3-agate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ test:
pipeline:
- runs: |
LIBRARY="agate"
OUTPUT=$(python -c "import $LIBRARY" 2>&1)
if echo "$OUTPUT" | grep -q "No module named"; then
echo "Failed to import library '$LIBRARY'. Please check if it is installed."
IMPORT_STATEMENT="import agate"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
Expand Down
7 changes: 4 additions & 3 deletions py3-anyio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ test:
pipeline:
- runs: |
LIBRARY="anyio"
OUTPUT=$(python -c "import $LIBRARY" 2>&1)
IMPORT_STATEMENT="import anyio"
if echo "$OUTPUT" | grep -q "No module named"; then
echo "Failed to import library '$LIBRARY'. Please check if it is installed."
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
Expand Down
21 changes: 20 additions & 1 deletion py3-appdirs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package:
name: py3-appdirs
version: 1.4.4
epoch: 5
description: "a small python module for appdir support"
description: a small python module for appdir support
copyright:
- license: MIT
dependencies:
Expand Down Expand Up @@ -37,3 +37,22 @@ update:
enabled: true
release-monitor:
identifier: 6278

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="appdirs"
IMPORT_STATEMENT="import appdirs"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
19 changes: 19 additions & 0 deletions py3-appnope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,22 @@ update:
manual: false
github:
identifier: minrk/appnope

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="appnope"
IMPORT_STATEMENT="import appnope"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
19 changes: 19 additions & 0 deletions py3-argcomplete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,22 @@ update:
github:
identifier: kislyuk/argcomplete
strip-prefix: v

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="argcomplete"
IMPORT_STATEMENT="import argcomplete"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
2 changes: 1 addition & 1 deletion py3-asn1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package:
name: py3-asn1
version: 0.4.8
epoch: 6
description: "Python3 ASN1 library"
description: Python3 ASN1 library
copyright:
- license: BSD-2-Clause
dependencies:
Expand Down
21 changes: 20 additions & 1 deletion py3-asn1crypto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package:
name: py3-asn1crypto
version: 1.5.1
epoch: 0
description: "Python ASN.1 library with a focus on performance and a pythonic API"
description: Python ASN.1 library with a focus on performance and a pythonic API
copyright:
- license: MIT
dependencies:
Expand Down Expand Up @@ -40,3 +40,22 @@ update:
identifier: wbond/asn1crypto
strip-prefix: v
use-tag: true

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="asn1crypto"
IMPORT_STATEMENT="from asn1crypto import cms"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
19 changes: 19 additions & 0 deletions py3-asttokens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,22 @@ update:
identifier: gristlabs/asttokens
strip-prefix: v
use-tag: true

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="asttokens"
IMPORT_STATEMENT="import asttokens"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
19 changes: 19 additions & 0 deletions py3-astunparse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,22 @@ update:
github:
identifier: simonpercivall/astunparse
strip-prefix: v

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="astunparse"
IMPORT_STATEMENT="import astunparse"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
2 changes: 1 addition & 1 deletion py3-awscrt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package:
name: py3-awscrt
version: 0.20.4
epoch: 0
description: "Python bindings for the AWS Common Runtime"
description: Python bindings for the AWS Common Runtime
copyright:
- license: Apache-2.0
dependencies:
Expand Down
21 changes: 20 additions & 1 deletion py3-babel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package:
epoch: 1
description: Python3 i18n tool
copyright:
- license: "BSD-3-Clause"
- license: BSD-3-Clause
dependencies:
runtime:
- python3
Expand Down Expand Up @@ -38,3 +38,22 @@ update:
shared: true
release-monitor:
identifier: 11984

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="babel"
IMPORT_STATEMENT="import babel"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
21 changes: 20 additions & 1 deletion py3-backcall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package:
epoch: 2
description: Specifications for callback functions passed in to an API
copyright:
- license: "BSD-3-Clause"
- license: BSD-3-Clause
dependencies:
runtime:
- python-3
Expand Down Expand Up @@ -37,3 +37,22 @@ update:
manual: false
github:
identifier: takluyver/backcall

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="backcall"
IMPORT_STATEMENT="import backcall"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
19 changes: 19 additions & 0 deletions py3-backoff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,22 @@ update:
enabled: true
release-monitor:
identifier: 44448

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="backoff"
IMPORT_STATEMENT="import backoff"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
21 changes: 20 additions & 1 deletion py3-beautifulsoup4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package:
epoch: 0
description: Screen-scraping library
copyright:
- license: "MIT License"
- license: MIT
dependencies:
runtime:
- py3-soupsieve
Expand Down Expand Up @@ -39,3 +39,22 @@ update:
enabled: true
release-monitor:
identifier: 3779

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="beautifulsoup4"
IMPORT_STATEMENT="from bs4 import BeautifulSoup"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
19 changes: 19 additions & 0 deletions py3-beniget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,22 @@ update:
github:
identifier: serge-sans-paille/beniget
use-tag: true

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="beniget"
IMPORT_STATEMENT="import beniget"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
21 changes: 20 additions & 1 deletion py3-bleach.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package:
epoch: 2
description: An easy safelist-based HTML-sanitizing tool.
copyright:
- license: Apache Software License
- license: Apache-2.0
dependencies:
runtime:
- py3-six
Expand Down Expand Up @@ -41,3 +41,22 @@ update:
identifier: mozilla/bleach
strip-prefix: v
use-tag: true

test:
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
LIBRARY="bleach"
IMPORT_STATEMENT="import bleach"
if ! python -c "$IMPORT_STATEMENT"; then
echo "Failed to import library '$LIBRARY'."
python -c "$IMPORT_STATEMENT" 2>&1
exit 1
else
echo "Library '$LIBRARY' is installed and can be imported successfully."
exit 0
fi
Loading

0 comments on commit e132aba

Please sign in to comment.