Skip to content

Commit b7f079f

Browse files
committed
Add GitHub action workflow to run unit tests on all supported python versions (except p3.6)
1 parent bdaabb0 commit b7f079f

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/unit-tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Unit Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
# 3.6 not supported on ubuntu-latest
12+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
cache: 'pip'
22+
cache-dependency-path: |
23+
tests/python/unit/requirements.txt
24+
code-env/python/spec/requirements.txt
25+
26+
- name: Install dependencies
27+
run: |
28+
pip install -r tests/python/unit/requirements.txt
29+
pip install -r code-env/python/spec/requirements.txt
30+
31+
- name: Run tests
32+
env:
33+
PYTHONPATH: python-lib
34+
DICTIONARY_FOLDER_PATH: resource/dictionaries
35+
STOPWORDS_FOLDER_PATH: resource/stopwords
36+
run: pytest tests/python/unit -v

0 commit comments

Comments
 (0)