Skip to content

Commit

Permalink
add bdist tests to github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Jul 27, 2024
1 parent 0ef4e34 commit 5634e10
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ jobs:
- name: pytest (non-win)
if: ${{ !startsWith(matrix.image, 'windows') }}
run: |
python -m pip install --upgrade pip setuptools wheel
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]"
Expand All @@ -359,6 +360,7 @@ jobs:
- name: pytest (win)
if: ${{ startsWith(matrix.image, 'windows') }}
run: |
python -m pip install --upgrade pip setuptools wheel
$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'
Expand All @@ -383,3 +385,97 @@ jobs:
flags: sdist_${{ matrix.name }}
name: codecov_sdist_${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

testB:
needs: [bdist]
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: Check out repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_ver }}
- name: Download bdist artifact
uses: actions/download-artifact@v4
with:
name: bdist
path: bld/bdist
- name: pytest (non-win)
if: ${{ !startsWith(matrix.image, 'windows') }}
run: |
python -m pip install --upgrade pip setuptools wheel
install_file=$(echo bld/bdist/interpret_core-*.whl)
install_file=$(basename "$install_file" .whl)
python -m pip install "bld/bdist/$install_file.whl[debug,notebook,plotly,lime,sensitivity,shap,linear,treeinterpreter,aplr,dash,skoperules,testing]"
mkdir -p "tmp/zqmr/t"
cp -R "python/interpret-core/tests/" "tmp/zqmr/t/"
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: |
python -m pip install --upgrade pip setuptools wheel
$install_file = Get-ChildItem -Path "bld/bdist" -Filter "interpret_core-*.whl"
$install_file = $install_file.Name -replace '\.whl$', ''
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
python -m pip install "bld/bdist/$install_file.whl[debug,notebook,plotly,lime,sensitivity,shap,linear,treeinterpreter,aplr,dash,skoperules,testing]"
New-Item -Path "tmp/zqmr/t" -ItemType Directory -Force
xcopy /E "python\interpret-core\tests\*" "tmp\zqmr\t\"
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: Test report
if: always()
uses: dorny/test-reporter@v1
with:
name: TestRB ${{ matrix.name }}
path: tmp/zqmr/t/junit/test-results.xml
reporter: java-junit
- name: Code coverage report
if: always()
uses: codecov/codecov-action@v4
with:
files: tmp/zqmr/t/coverage.xml
flags: bdist_${{ matrix.name }}
name: codecov_bdist_${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 5634e10

Please sign in to comment.