Skip to content

experimental: adds a new workflow for QA for testing PyPI packages with conda pypi install#222

Open
travishathaway wants to merge 7 commits into
conda:mainfrom
travishathaway:issue-213
Open

experimental: adds a new workflow for QA for testing PyPI packages with conda pypi install#222
travishathaway wants to merge 7 commits into
conda:mainfrom
travishathaway:issue-213

Conversation

@travishathaway

Copy link
Copy Markdown
Contributor

Description

fixes: #213

I'm still personally unsure if this is actually useful and makes sense to merge, but I figured this would be a good place to have that conversation.

To see some runs, you can check out my fork:

@travishathaway travishathaway requested a review from a team as a code owner January 27, 2026 20:03
@codspeed-hq

codspeed-hq Bot commented Jan 27, 2026

Copy link
Copy Markdown

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing travishathaway:issue-213 (87ee244) with main (385102e)

Summary

✅ 5 untouched benchmarks

@soapy1

soapy1 commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

this is pretty neat! Though I'm wondering who the target audience for this is and what their thoughts are. If it's useful to them I'm happy to give this a ✔️.

For me, I think I feel good about running these tests on my own machine for investigation, and I don't think I would use this. I feel pretty good about the current test suite being able to point out any cross platform issues. But, it is pretty telling that lots of these tests failed. So maybe there is also opportunity to include this style of test in the normal test suite?

Comment on lines +72 to +79
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: qa-test-results-${{ matrix.os }}-py${{ inputs.python-version }}
path: |
${{ runner.temp }}/**/*.log
retention-days: 7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Comment thread tests/test_qa_wheels.py
Comment on lines +112 to +123
prefix = tmp_path / "env"

conda_cli(
"create",
"--prefix",
str(tmp_path / "env"),
"--channel",
"defaults",
"--override-channels",
"-y",
"python",
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This create is what tmp_env is for:

Suggested change
prefix = tmp_path / "env"
conda_cli(
"create",
"--prefix",
str(tmp_path / "env"),
"--channel",
"defaults",
"--override-channels",
"-y",
"python",
)
with tmp_env(
"--override-channels",
"--channel=defaults",
"python",
) as prefix:

Comment thread tests/conftest.py
"""Register --qa-packages command line option"""
parser.addoption(
"--qa-packages",
action="append",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this to "extend" and we can skip all of the argument formatting in the workflow

Comment on lines +54 to +66
run: |
# Parse multiline input into array
IFS=$' ' read -rd '' -a packages <<< "${{ inputs.packages }}" || true

# Build pytest command with --qa-packages for each package
pytest_args="-m qa -v --basetemp=${{ runner.os == 'Windows' && 'D:\\temp' || runner.temp }} tests/test_qa_wheels.py"
for pkg in "${packages[@]}"; do
# Trim whitespace
pkg=$(echo "$pkg" | xargs)
if [ -n "$pkg" ]; then
pytest_args="$pytest_args --qa-packages $pkg"
fi
done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flatten it so it's more readable:

Suggested change
run: |
# Parse multiline input into array
IFS=$' ' read -rd '' -a packages <<< "${{ inputs.packages }}" || true
# Build pytest command with --qa-packages for each package
pytest_args="-m qa -v --basetemp=${{ runner.os == 'Windows' && 'D:\\temp' || runner.temp }} tests/test_qa_wheels.py"
for pkg in "${packages[@]}"; do
# Trim whitespace
pkg=$(echo "$pkg" | xargs)
if [ -n "$pkg" ]; then
pytest_args="$pytest_args --qa-packages $pkg"
fi
done
env:
BASETEMP: ${{ runner.os == 'Windows' && 'D:\\temp' || runner.temp }}
run: |
# Convert package list to --qa-packages arguments
qa_args=$(echo "${{ inputs.packages }}" | xargs | sed 's/[^ ][^ ]*/--qa-packages &/g')
# Run pixi/pytest
pixi run --environment ${{ env.PIXI_ENV_NAME }} python -mpytest \
-m qa -v \
--basetemp="${BASETEMP}" \
$qa_args \
tests/test_qa_wheels.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New GitHub Action for testing conda pypi install for wheels

3 participants