9
9
paths :
10
10
- " powershap/**"
11
11
- " tests/**"
12
- - " poetry .lock"
12
+ - " uv .lock"
13
13
- " .github/workflows/test.yml"
14
14
pull_request :
15
15
branches : [ main ]
16
16
paths :
17
17
- " powershap/**"
18
18
- " tests/**"
19
- - " poetry .lock"
19
+ - " uv .lock"
20
20
- " .github/workflows/test.yml"
21
21
22
22
jobs :
@@ -26,54 +26,48 @@ jobs:
26
26
strategy :
27
27
fail-fast : false
28
28
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" ]
31
31
defaults :
32
32
run :
33
33
shell : bash
34
34
35
35
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
+
37
43
- name : Set up Python ${{ matrix.python-version }}
38
- uses : actions/setup-python@v4
44
+ uses : actions/setup-python@v5
39
45
with :
40
46
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
41
55
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
53
56
54
- - run : sudo apt-get install llvm # Because https://github.com/slundberg/shap/issues/1854
55
57
- 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
59
59
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
66
60
- name : Test with pytest
67
-
68
61
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
+
70
64
- name : Upload pytest test results
71
- uses : actions/upload-artifact@v3
65
+ uses : actions/upload-artifact@v4
72
66
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
75
69
# Use always() to always run this step to publish test results when there are test failures
76
70
if : ${{ always() }}
77
71
78
72
- name : Upload coverage to Codecov
79
- uses : codecov/codecov-action@v3
73
+ uses : codecov/codecov-action@v5
0 commit comments