Skip to content

Commit

Permalink
CI: TEST pip installed packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Apr 26, 2023
1 parent 5c15103 commit c59b7c3
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,63 @@ 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 show version
shell: bash -l {0}
run: |
python -m pip -V
- name: PIP install required packages
shell: bash -l {0}
run: |
python -m pip install lpynn numpy
- name: PIP show installed packages
shell: bash -l {0}
run: |
python -m pip list
- name: Test PIP Packages with Python
shell: bash -l {0}
run: |
export PYTHONPATH=./src/runtime/lpython
python integration_tests/test_pip_import_01.py
- name: Test PIP Packages 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 c59b7c3

Please sign in to comment.