Skip to content
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
10 changes: 7 additions & 3 deletions .github/get-supported-python-versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,14 @@ def _parse_args() -> pathlib.Path:

def _main(package: pathlib.Path) -> None:
versions = _get_supported_python_versions(package=package)
line = f'versions={json.dumps(versions)}'
print(line)
lines = [
f'versions={json.dumps(versions)}',
f'min_version={versions[0]}',
]
with pathlib.Path(os.environ['GITHUB_OUTPUT']).open('a') as f:
print(line, file=f)
for line in lines:
print(line) # logging
print(line, file=f)


def _get_supported_python_versions(package: pathlib.Path) -> list[str]:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,15 @@ jobs:
- name: Check substrates needed for integration tests
id: integration-substrates
if: contains(fromJson(steps.tests.outputs.tests), 'integration')
env:
PACKAGE: ${{ inputs.package }}
PYTHON: ${{ steps.python.outputs.min_version }}
run: |
set -x # print lines before executing them
substrates=()
for substrate in k8s machine; do
set +e # don't abort if the next process has a non-zero exit code
uvx --from rust-just just integration-$substrate ${{ inputs.package }} --collect-only -q
uvx --from rust-just just python="$PYTHON" integration-$substrate "$PACKAGE" --collect-only -q
case $? in
0) substrates+=($substrate);;
5) echo "No tests for $substrate";;
Expand Down
Loading