99 paths :
1010 - " powershap/**"
1111 - " tests/**"
12- - " poetry .lock"
12+ - " uv .lock"
1313 - " .github/workflows/test.yml"
1414 pull_request :
1515 branches : [ main ]
1616 paths :
1717 - " powershap/**"
1818 - " tests/**"
19- - " poetry .lock"
19+ - " uv .lock"
2020 - " .github/workflows/test.yml"
2121
2222jobs :
@@ -26,54 +26,48 @@ jobs:
2626 strategy :
2727 fail-fast : false
2828 matrix :
29- os : ['ubuntu-latest'] # TODO - do we add other OSes?
30- python-version : ["3.9", "3.10", "3.11", "3.12"]
29+ os : ['ubuntu-latest', 'windows-latest' ] # TODO - do we add other OSes?
30+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13" ]
3131 defaults :
3232 run :
3333 shell : bash
3434
3535 steps :
36- - uses : actions/checkout@v4
36+ - uses : actions/checkout@v5
37+
38+ - name : Install uv
39+ uses : astral-sh/setup-uv@v6
40+ with :
41+ enable-cache : true
42+
3743 - name : Set up Python ${{ matrix.python-version }}
38- uses : actions/setup-python@v4
44+ uses : actions/setup-python@v5
3945 with :
4046 python-version : ${{ matrix.python-version }}
47+
48+ - name : Install llvm on Ubuntu
49+ if : runner.os == 'Linux'
50+ run : sudo apt-get install llvm # Because https://github.com/slundberg/shap/issues/1854
51+
52+ - name : Install MSVC build tools on Windows
53+ if : runner.os == 'Windows'
54+ uses : microsoft/setup-msbuild@v1
4155
42- - name : Install Poetry
43- uses : snok/install-poetry@v1
44- with :
45- version : 1.5.1
46- - name : Cache poetry
47- id : cached-poetry-dependencies
48- uses : actions/cache@v3
49- with :
50- path : ~/.cache/pypoetry/virtualenvs
51- key : ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}-python-${{ matrix.python-version }}
52- - run : poetry --version
5356
54- - run : sudo apt-get install llvm # Because https://github.com/slundberg/shap/issues/1854
5557 - name : Install dependencies
56- run : poetry install --all-extras
57- # Do not use caching (anymore)
58- # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
58+ run : uv sync --locked --all-extras --dev
5959
60- # - name: Lint with flake8
61- # run: |
62- # # stop the build if there are Python syntax errors or undefined names
63- # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
64- # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
65- # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
6660 - name : Test with pytest
67-
6861 run : |
69- poetry run pytest --cov=powershap --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov-report=xml tests
62+ uv run pytest --cov=powershap --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov-report=xml tests
63+
7064 - name : Upload pytest test results
71- uses : actions/upload-artifact@v3
65+ uses : actions/upload-artifact@v4
7266 with :
73- name : pytest-results-${{ matrix.python-version }}
74- path : junit/test-results-${{ matrix.python-version }}.xml
67+ name : pytest-results-${{ matrix.python-version }}-${{matrix.os}}
68+ path : junit/test-results-${{ matrix.python-version }}-${{matrix.os}} .xml
7569 # Use always() to always run this step to publish test results when there are test failures
7670 if : ${{ always() }}
7771
7872 - name : Upload coverage to Codecov
79- uses : codecov/codecov-action@v3
73+ uses : codecov/codecov-action@v5
0 commit comments