Skip to content

Commit 4181554

Browse files
authored
Merge pull request #4 from wandb/unit-tests
Remove test warnings and add github action to run tests
2 parents 406323a + 4c72902 commit 4181554

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run Unit Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
python-version: [3.9]
16+
17+
steps:
18+
- name: Check out code
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install setuptools wheel
30+
pip install -e .
31+
pip install pytest
32+
33+
- name: Run tests
34+
run: pytest

programmer/tests/conftest.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import warnings
2+
3+
# Disable the specific DeprecationWarning for distutils
4+
warnings.filterwarnings(
5+
"ignore",
6+
category=DeprecationWarning,
7+
message="The distutils package is deprecated and slated for removal",
8+
)
9+
10+
# Disable SentryHubDeprecationWarning
11+
warnings.filterwarnings(
12+
"ignore",
13+
category=DeprecationWarning, # or use SentryHubDeprecationWarning if it's a custom category
14+
message="`sentry_sdk.Hub` is deprecated and will be removed",
15+
)

0 commit comments

Comments
 (0)