smdbs commited on
Commit
eb8ecfe
·
1 Parent(s): 1b23a4c

feat: add test workflow and pytest.ini

Browse files

Added test workflow to run tests on push and pull requests. Added pytest.ini to configure pytest to ignore DeprecationWarning.

Files changed (2) hide show
  1. .github/workflows/test.yaml +32 -0
  2. pytest.ini +3 -0
.github/workflows/test.yaml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Python tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ matrix:
16
+ python-version: [3.10, 3.9, 3.8]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ - name: Display Python version
25
+ run: python -c "import sys; print(sys.version)"
26
+ - name: Install dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ pip install -r requirements.txt
30
+ - name: Run tests
31
+ run: |
32
+ python -m pytest test.py
pytest.ini ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [pytest]
2
+ filterwarnings =
3
+ ignore::DeprecationWarning