Add GitHub action workflow to run unit tests on all supported python … #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Unit Tests | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # 3.6 not supported on ubuntu-latest | |
| python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| tests/python/unit/requirements.txt | |
| code-env/python/spec/requirements.txt | |
| - name: Install dependencies | |
| run: | | |
| pip install -r tests/python/unit/requirements.txt | |
| pip install -r code-env/python/spec/requirements.txt | |
| - name: Run tests | |
| env: | |
| PYTHONPATH: python-lib | |
| DICTIONARY_FOLDER_PATH: resource/dictionaries | |
| STOPWORDS_FOLDER_PATH: resource/stopwords | |
| run: pytest tests/python/unit -v |