Merge pull request #81 from jamessimone/patch-1 #157
This file contains 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
## | |
## Copyright (c) 2023 Salesforce.com, inc. | |
## All rights reserved. | |
## SPDX-License-Identifier: BSD-3-Clause | |
## For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause | |
## | |
## | |
name: tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update -y | |
python -m pip install --upgrade pip setuptools wheel build | |
python -m pip install flake8 pytest | |
python -m build | |
for f in dist/*.whl; do pip install $f[all]; done | |
python -m nltk.downloader punkt | |
# TODO: Add Flake8 check | |
# - name: Lint with Flake8 | |
# run: | | |
# # stop the build if there are Python syntax errors or undefined names | |
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with pytest | |
env: | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
run: | | |
./run_unittests.sh |