diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..4b712d7 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,31 @@ +name: Python package + +on: [push] + +jobs: + test: + + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: [ + "3.8", "3.9", "3.10", "3.11", + "pypy3.9" + ] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: pip + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + - name: Test unit tests + run: | + python -m unittest discover -s sacremoses/test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f9e328b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: python - -os: linux -dist: focal - -addons: - apt: - packages: - - expect-dev - -python: # https://docs.travis-ci.com/user/languages/python/ - - "3.6" - - "3.8" - - "3.9" - - "pypy3" - - "3.10.1" - -cache: pip - -install: - - pip install joblib # For parallelization. - - pip install click # For CLI. - - pip install tqdm # For progressbar. - - pip install regex # For regex (simpler access to perluniprops) - -script: - - unbuffer python -m unittest discover sacremoses/test/ -v diff --git a/setup.py b/setup.py index 5ac6781..67dcbd2 100644 --- a/setup.py +++ b/setup.py @@ -22,4 +22,5 @@ ], install_requires = ['regex', 'click', 'joblib', 'tqdm'], entry_points=console_scripts, + python_requires='>=3.8', )