Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 7179adf

Browse files
committed
Add pyhdk pytest to GitHub Actions
1 parent dad0aff commit 7179adf

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/workflows/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,6 @@ jobs:
7676

7777
sanity-test:
7878
uses: ./.github/workflows/build-docker-hdk.yml
79+
80+
pytest:
81+
uses: ./.github/workflows/pytest.yml

.github/workflows/pytest.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: pyhdk pytest
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
env:
10+
CONDA_ENV: omnisci-dev
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Set env context
16+
run: |
17+
echo CONDA_PATH=$CONDA >>$GITHUB_ENV
18+
echo RUN_STAMP=${{ runner.os }}-${{ (env.cuda_compiler_version != 'None') && format('cuda{0}', env.cuda_compiler_version) || 'cpu' }} >>$GITHUB_ENV
19+
echo CONDA_ENV_PATH=$CONDA/envs/${{ env.CONDA_ENV }} >>$GITHUB_ENV
20+
21+
- name: Update Conda
22+
run: |
23+
conda update conda
24+
conda env update -f omniscidb/scripts/mapd-deps-conda-dev-env.yml
25+
conda install -n ${{ env.CONDA_ENV }} -c conda-forge python=3.8
26+
27+
- name: Restore Maven cache
28+
uses: actions/cache@v3
29+
with:
30+
path: |
31+
~/.m2
32+
key: ${{ env.RUN_STAMP }}-maven-${{ hashFiles('**/pom.xml') }}
33+
restore-keys: ${{ env.RUN_STAMP }}-maven
34+
35+
- name: Build
36+
env:
37+
CPU_COUNT: 4
38+
RUN_TESTS: 1
39+
run: |
40+
mkdir -p ${{ env.PREFIX }} build
41+
cd build
42+
$CONDA/bin/conda run -n ${{ env.CONDA_ENV }} sh -c "cmake .. -DENABLE_CUDA=off -DENABLE_CONDA=on -DENABLE_PYTHON=on -DCMAKE_BUILD_TYPE=release && make -j2 && make install"
43+
44+
- name: Run pytest
45+
run: |
46+
$CONDA/bin/conda run -n ${{ env.CONDA_ENV }} pytest python/tests/ --ignore=python/tests/modin

0 commit comments

Comments
 (0)