Skip to content

PyPI Unit test

PyPI Unit test #808

Workflow file for this run

name: PyPI Unit test
on:
schedule:
- cron: '0 0 * * *' # Once per day
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: True
run: |
python -m pip install --upgrade pip
pip install deepcut tltk
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True pip install -r https://raw.githubusercontent.com/PyThaiNLP/pythainlp/dev/docker_requirements.txt
pip install pythainlp[full]
python -m nltk.downloader omw-1.4
- name: Test
run: |
mkdir pythainlp_test
cd pythainlp_test
pip download --no-binary=:all: --no-dependencies pythainlp
file="find . -name *.tar.gz"
file=$(eval "$file")
tar -xvzf $file --one-top-level
second="/"
path=${file//.tar.gz/$second}
cd $path
ls
cd tests
mkdir tests
mv data tests/
python -m unittest discover