Skip to content

Todo: add load_tests for test suites #20

Todo: add load_tests for test suites

Todo: add load_tests for test suites #20

Workflow file for this run

name: Unit test and code coverage (macOS)
on:
push:
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
branches:
- dev
paths-ignore:
- '**.md'
- 'docs/**'
jobs:
unittest:
strategy:
fail-fast: false
matrix:
os: ["macos-latest"]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Print system info
run: sw_vers; python --version; arch
- name: Install build tools
run: |
python -m pip install --upgrade "pip<24.1" "setuptools==73.0.1"
python -m pip install coverage coveralls pytest
- name: Install ICU
run: |
brew install icu4c
PKG_CONFIG_PATH=$(brew --prefix)/opt/icu4c/lib/pkgconfig
echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}" >> "${GITHUB_ENV}"
ICU_VER=$(pkg-config --modversion icu-i18n)
echo "ICU_VER=${ICU_VER}"
echo "ICU_VER=${ICU_VER}" >> "${GITHUB_ENV}"
- name: Install PyTorch
run: pip install torch
# if needed, get pip wheel link from http://download.pytorch.org/whl/torch/
# - name: Install dependencies
# env:
# SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: True
# run: |
# python -m pip install -r docker_requirements.txt
- name: Install PyThaiNLP
run: |
python -m pip install .
- name: Test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
run: |
python -c "import nltk; nltk.download('omw-1.4')"
coverage run -m unittest discover
coveralls