Skip to content

Commit

Permalink
CI: TEST: Enable testing pip installed packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Apr 24, 2023
1 parent 579b185 commit 66423ff
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,52 @@ jobs:
which node
node -v
node src/lpython/tests/test_lpython.js
test_pip_pkgs:
name: Test PIP Installable Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: ci/environment.yml
extra-specs: |
bison=3.4
- uses: hendrikmuhs/ccache-action@main
with:
variant: sccache
key: ${{ github.job }}-${{ matrix.os }}

- name: Setup Platform (Linux)
shell: bash -l {0}
run: |
echo "LFORTRAN_CMAKE_GENERATOR=Unix Makefiles" >> $GITHUB_ENV
echo "WIN=0" >> $GITHUB_ENV
echo "MACOS=0" >> $GITHUB_ENV
echo "ENABLE_RUNTIME_STACKTRACE=yes" >> $GITHUB_ENV
- name: Build Linux
shell: bash -l {0}
run: |
xonsh ci/build.xsh
- name: PIP install required packages
shell: bash -l {0}
run: |
python -m pip install lptypes lpynn numpy
- name: Test PIP Pacakges with Python
shell: bash -l {0}
run: |
python integration_tests/test_pip_import_01.py
- name: Test PIP Pacakges with LPython
shell: bash -l {0}
run: |
pip_pkg_path=$(python -c "import site; print(site.getsitepackages()[0])")
echo $pip_pkg_path
./src/bin/lpython integration_tests/test_pip_import_01.py -I $pip_pkg_path

0 comments on commit 66423ff

Please sign in to comment.