Skip to content

Commit

Permalink
test: add installation test for simple scikit-build-core package
Browse files Browse the repository at this point in the history
  • Loading branch information
davhofer committed Aug 20, 2024
1 parent 41f2863 commit ba2a036
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/run-installation-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: davhofer/py2spack-spack-installation-test:latest
image: davhofer/py2spack-spack-installation-test:latest

steps:
- name: Checkout code
Expand All @@ -22,7 +22,7 @@ jobs:
run: echo $SPACK_ROOT

# Test tqdm installation
- name: Remove tqdm
- name: Remove tqdm
run: |
rm -rd $SPACK_PKGS/py-tqdm || true
Expand All @@ -40,7 +40,7 @@ jobs:
if: success()

# Test pygments installation
- name: Remove pygments and dependency colorama
- name: Remove pygments and dependency colorama
run: |
rm -rd $SPACK_PKGS/py-pygments || true
rm -rd $SPACK_PKGS/py-colorama || true
Expand All @@ -59,7 +59,7 @@ jobs:
if: success()

# Test flask installation
- name: Remove flask and dependency jinja2
- name: Remove flask and dependency jinja2
run: |
rm -rd $SPACK_PKGS/py-flask || true
rm -rd $SPACK_PKGS/py-jinja2 || true
Expand All @@ -77,3 +77,16 @@ jobs:
run: echo "flask import succeeded"
if: success()

# Test sbc-example installation (scikit-build-core python extension)
- name: Run py2spack conversion
run: py2spack --versions-per-package 5 --max-conversions 1 https://github.com/davhofer/sbc-example

- name: Install py-sbc-example with Spack
run: $SPACK_ROOT/bin/spack install py-sbc-example

- name: Load py-sbc-example with Spack and test import
run: cd $SPACK_ROOT && . share/spack/setup-env.sh && spack load py-sbc-example && python -c 'import example; example.square(4);'

- name: Check if import of scikit-build-core example package was successfull
run: echo "import of scikit-build-core example package succeeded"
if: success()

0 comments on commit ba2a036

Please sign in to comment.