Skip to content

Commit 81eecbc

Browse files
authored
Merge pull request #48 from predict-idlab/dev-jonas
🙏 update testing
2 parents b4d7d32 + aec4788 commit 81eecbc

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

.github/workflows/test.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,54 @@ name: Unit tests
66
on:
77
push:
88
branches: [ main ]
9+
paths:
10+
- "powershap/**"
11+
- "tests/**"
12+
- "poetry.lock"
13+
- ".github/workflows/test.yml"
914
pull_request:
1015
branches: [ main ]
16+
paths:
17+
- "powershap/**"
18+
- "tests/**"
19+
- "poetry.lock"
20+
- ".github/workflows/test.yml"
1121

1222
jobs:
13-
build:
23+
test:
1424

1525
runs-on: ${{ matrix.os }}
1626
strategy:
1727
fail-fast: false
1828
matrix:
19-
os: ['ubuntu-latest']
29+
os: ['ubuntu-latest'] # TODO - do we add other OSes?
2030
python-version: ["3.7", "3.8", "3.9", "3.10"]
31+
defaults:
32+
run:
33+
shell: bash
2134

2235
steps:
23-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v4
2437
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v2
38+
uses: actions/setup-python@v4
2639
with:
2740
python-version: ${{ matrix.python-version }}
2841

2942
- name: Install Poetry
3043
uses: snok/install-poetry@v1
44+
with:
45+
version: 1.5.1
3146
- name: Cache poetry
3247
id: cached-poetry-dependencies
33-
uses: actions/cache@v2
48+
uses: actions/cache@v3
3449
with:
3550
path: ~/.cache/pypoetry/virtualenvs
3651
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}-python-${{ matrix.python-version }}
3752
- run: poetry --version
3853

3954
- run: sudo apt-get install llvm # Because https://github.com/slundberg/shap/issues/1854
4055
- name: Install dependencies
41-
run: poetry install
56+
run: poetry install --all-extras
4257
# Do not use caching (anymore)
4358
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
4459

@@ -49,16 +64,16 @@ jobs:
4964
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
5065
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
5166
- name: Test with pytest
67+
5268
run: |
5369
poetry run pytest --cov=powershap --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov-report=xml tests
54-
5570
- name: Upload pytest test results
56-
uses: actions/upload-artifact@v2
71+
uses: actions/upload-artifact@v3
5772
with:
5873
name: pytest-results-${{ matrix.python-version }}
5974
path: junit/test-results-${{ matrix.python-version }}.xml
6075
# Use always() to always run this step to publish test results when there are test failures
6176
if: ${{ always() }}
6277

6378
- name: Upload coverage to Codecov
64-
uses: codecov/codecov-action@v1
79+
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)