diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1af5a648..860836943 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | @@ -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