Skip to content

Commit

Permalink
add sdist tests to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Jul 26, 2024
1 parent b3c1f59 commit 3807690
Showing 1 changed file with 90 additions and 3 deletions.
93 changes: 90 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
if: startsWith(matrix.image, 'windows')
run: |
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
.\build.bat ${{ matrix.options }} ${{ matrix.asm }}
./build.bat ${{ matrix.options }} ${{ matrix.asm }}
- name: Build on Linux
if: startsWith(matrix.image, 'ubuntu')
run: |
Expand Down Expand Up @@ -285,9 +285,96 @@ jobs:
if: ${{ startsWith(matrix.image, 'windows') && github.event_name != 'schedule' }}
run: |
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
.\shared\libebm\tests\libebm_test.bat ${{ matrix.options }} ${{ matrix.existing }}
./shared/libebm/tests/libebm_test.bat ${{ matrix.options }} ${{ matrix.existing }}
- name: win test_native (Schedule)
if: ${{ startsWith(matrix.image, 'windows') && github.event_name == 'schedule' }}
run: |
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
.\shared\libebm\tests\libebm_test.bat ${{ matrix.options }} ${{ matrix.existing }} ${{ matrix.scheduled }}
./shared/libebm/tests/libebm_test.bat ${{ matrix.options }} ${{ matrix.existing }} ${{ matrix.scheduled }}
testS:
needs: [sdist]
strategy:
matrix:
include:
- name: linux_39_python
python_ver: "3.9"
image: ubuntu-latest
- name: linux_310_python
python_ver: "3.10"
image: ubuntu-latest
- name: linux_311_python
python_ver: "3.11"
image: ubuntu-latest
- name: linux_312_python
python_ver: "3.12"
image: ubuntu-latest
- name: mac_39_python
python_ver: "3.9"
image: macos-latest
- name: mac_310_python
python_ver: "3.10"
image: macos-latest
- name: mac_311_python
python_ver: "3.11"
image: macos-latest
- name: mac_312_python
python_ver: "3.12"
image: macos-latest
- name: win_39_python
python_ver: "3.9"
image: windows-latest
- name: win_310_python
python_ver: "3.10"
image: windows-latest
- name: win_311_python
python_ver: "3.11"
image: windows-latest
- name: win_312_python
python_ver: "3.12"
image: windows-latest
runs-on: ${{ matrix.image }}
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_ver }}
- name: Download sdist artifact
uses: actions/download-artifact@v4
with:
name: sdist
path: bld/sdist
- name: pytest (non-win)
if: ${{ !startsWith(matrix.image, 'windows') }}
run: |
install_file=$(echo bld/sdist/interpret_core-*.tar.gz)
install_file=$(basename "$install_file" .tar.gz)
python -m pip install "bld/sdist/$install_file.tar.gz[debug,notebook,plotly,lime,sensitivity,shap,linear,treeinterpreter,aplr,dash,skoperules,testing]"
mkdir -p "tmp/zqmr/t"
tar -xzvf "bld/sdist/$install_file.tar.gz" -C "tmp/zqmr/t" "$install_file/tests"
cd "tmp/zqmr/t"
python -m pytest -vv -n auto --junitxml=junit/test-results.xml --cov=interpret --cov-report=xml --cov-report=html
- name: pytest (win)
if: ${{ startsWith(matrix.image, 'windows') }}
run: |
$install_file = Get-ChildItem -Path "bld/sdist" -Filter "interpret_core-*.tar.gz"
$install_file = $install_file.Name -replace '\.tar\.gz$', ''
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
python -m pip install "bld/sdist/$install_file.tar.gz[debug,notebook,plotly,lime,sensitivity,shap,linear,treeinterpreter,aplr,dash,skoperules,testing]"
New-Item -Path "tmp/zqmr/t" -ItemType Directory -Force
tar -xzvf "bld/sdist/$install_file.tar.gz" -C "tmp/zqmr/t" "$install_file/tests"
cd "tmp/zqmr/t"
$env:PATH += ";$env:GeckoWebDriver"
python -m pytest -vv -n auto --junitxml=junit/test-results.xml --cov=interpret --cov-report=xml --cov-report=html
- name: Publish test results
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: test_results_${{ matrix.name }}
path: tmp/zqmr/t/junit/test-results.xml
- name: Publish code coverage results
if: startsWith(matrix.image.name, 'windows')
uses: actions/upload-artifact@v4
with:
name: coverage_results_${{ matrix.name }}
path: tmp/zqmr/t/coverage.xml

0 comments on commit 3807690

Please sign in to comment.