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

Use virtualenv for pytest in generated GitHub Actions configuration #1951

Closed
messense opened this issue Feb 21, 2024 · 0 comments · Fixed by #2004
Closed

Use virtualenv for pytest in generated GitHub Actions configuration #1951

messense opened this issue Feb 21, 2024 · 0 comments · Fixed by #2004
Labels
enhancement New feature or request github_actions Pull requests that update GitHub Actions code good first issue Good for newcomers

Comments

@messense
Copy link
Member

maturin/src/ci.rs

Lines 347 to 379 in b209c4b

if self.pytest {
if matches!(platform, Platform::Linux) {
// Test on host for x86_64
conf.push_str(&format!(
" - name: pytest
if: ${{{{ startsWith(matrix.target, 'x86_64') }}}}
shell: bash
run: |
set -e
pip install {project_name} --find-links dist --force-reinstall
pip install pytest
{chdir}pytest
"
));
// Test on QEMU for other architectures
conf.push_str(&format!(
" - name: pytest
if: ${{{{ !startsWith(matrix.target, 'x86') && matrix.target != 'ppc64' }}}}
uses: uraimo/[email protected]
with:
arch: ${{{{ matrix.target }}}}
distro: ubuntu22.04
githubToken: ${{{{ github.token }}}}
install: |
apt-get update
apt-get install -y --no-install-recommends python3 python3-pip
pip3 install -U pip pytest
run: |
set -e
pip3 install {project_name} --find-links dist --force-reinstall
{chdir}pytest
"
));

@messense messense added enhancement New feature or request good first issue Good for newcomers github_actions Pull requests that update GitHub Actions code labels Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request github_actions Pull requests that update GitHub Actions code good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant