Skip to content

Commit 66423ff

Browse files
committed
CI: TEST: Enable testing pip installed packages
1 parent 579b185 commit 66423ff

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/CI.yml

+49
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,52 @@ jobs:
184184
which node
185185
node -v
186186
node src/lpython/tests/test_lpython.js
187+
188+
test_pip_pkgs:
189+
name: Test PIP Installable Packages
190+
runs-on: ubuntu-latest
191+
steps:
192+
- uses: actions/checkout@v3
193+
with:
194+
fetch-depth: 0
195+
196+
- uses: mamba-org/provision-with-micromamba@v15
197+
with:
198+
environment-file: ci/environment.yml
199+
extra-specs: |
200+
bison=3.4
201+
202+
- uses: hendrikmuhs/ccache-action@main
203+
with:
204+
variant: sccache
205+
key: ${{ github.job }}-${{ matrix.os }}
206+
207+
- name: Setup Platform (Linux)
208+
shell: bash -l {0}
209+
run: |
210+
echo "LFORTRAN_CMAKE_GENERATOR=Unix Makefiles" >> $GITHUB_ENV
211+
echo "WIN=0" >> $GITHUB_ENV
212+
echo "MACOS=0" >> $GITHUB_ENV
213+
echo "ENABLE_RUNTIME_STACKTRACE=yes" >> $GITHUB_ENV
214+
215+
- name: Build Linux
216+
shell: bash -l {0}
217+
run: |
218+
xonsh ci/build.xsh
219+
220+
- name: PIP install required packages
221+
shell: bash -l {0}
222+
run: |
223+
python -m pip install lptypes lpynn numpy
224+
225+
- name: Test PIP Pacakges with Python
226+
shell: bash -l {0}
227+
run: |
228+
python integration_tests/test_pip_import_01.py
229+
230+
- name: Test PIP Pacakges with LPython
231+
shell: bash -l {0}
232+
run: |
233+
pip_pkg_path=$(python -c "import site; print(site.getsitepackages()[0])")
234+
echo $pip_pkg_path
235+
./src/bin/lpython integration_tests/test_pip_import_01.py -I $pip_pkg_path

0 commit comments

Comments
 (0)