-
Notifications
You must be signed in to change notification settings - Fork 65
/
.travis.yml
73 lines (67 loc) · 3.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
language: python
# free travis CI partner queue
os: linux
arch:
- arm64
jobs:
include:
- python: '3.8'
- python: '3.9'
- python: '3.10'
- python: '3.11'
env: PRE_COMMIT=1
fast_finish: true
dist: bionic
install:
- test ! "$PRE_COMMIT" || pip install pre-commit
- if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then pip install -U importlib_metadata; fi
- pip install pylint
- pip install coverage
- pip install coveralls
- pip install hypothesis
# Check if installing works
- pip install -e .
script:
- test ! "$PRE_COMMIT" || pre-commit run --all-files
# Check for import errors
- coverage run --source=quantulum3 scripts/test_import_error.py
# Build common words
- coverage run --source=quantulum3 scripts/build.py
# Test basic functionality
- coverage run -a --source=quantulum3 setup.py test -s quantulum3.tests.test_setup
# Test generally that user-facing functions do not throw errors
- coverage run -a --source=quantulum3 setup.py test -s quantulum3.tests.test_hypothesis
# Test whether quantulum works without classifier
- coverage run -a --source=quantulum3 setup.py test -s quantulum3.tests.test_no_classifier
# Test whether quantulum parses ranges correctly
- coverage run -a --source=quantulum3 setup.py test -s quantulum3.tests.test_parse_ranges
# Test language specific non-classifier tasks
- coverage run -a --source=quantulum3 setup.py test -s quantulum3._lang.en_US.tests.extract_spellout_values
# Test class methods
- coverage run -a --source=quantulum3 setup.py test -s quantulum3.tests.test_classes
# Test requirements.txt for classifier requirements
- pip install -r requirements_classifier.txt
# Lint package, now that all requirements are installed
- pylint quantulum3
# Test classifier building and classifier functionality
# Note that the classifier trained here is included in the target package
- coverage run -a --source=quantulum3 setup.py test -s quantulum3.tests.test_classifier.ClassifierBuild
- coverage run -a --source=quantulum3 setup.py test -s quantulum3.tests.test_classifier.ClassifierTest
- coverage run -a --source=quantulum3 setup.py test -s quantulum3.tests.test_scripts.TrainScriptTest
- coverage run -a --source=quantulum3 setup.py test -s quantulum3.tests.test_load.TestCached
- coverage run -a --source=quantulum3 setup.py test -s quantulum3.tests.test_load.TestLoaders
after_success:
- coverage report
- coveralls
deploy:
provider: pypi
on:
branch: master
python: "3.9"
distributions: "sdist bdist_wheel"
skip_existing: true
# Keep the generated classifier
skip_cleanup: true
username: "nielstron"
password:
secure: "D4z+rdEkCtg3ABCFDeRv+YsO2maKezX7F54wZbDeycxSBOFcRIRvGfKDWDwXzAqmPhtjZbntqQN6Dks1X/I06t1iXXbrvklVFynwlftOqVg+jGXl9Arpp0DUO0XPvma6rDDXPGxKBgVi2f56Q+ulCtYLMjAUnUDObOZIDYBQHHsjbeiKS1u02olwQTrdqJxNaLu8+thmmkcmgOs2mlXpL7CNn+DvJTI7D74KwOckarA7CjOJ3V2Fvyq+WB1/3GCj90CxOoejqlCbxn5CJa4bGyRwutP0C+SHUJFtH+2ZTgv2KayiqBO+rC2nVrEzvE/VmsFXdC2Ai/UryDcCSb1K6RWU4MqyFsHtEGRq7iwdEGr5UNClCYeZU+H+LJAkk066j33rfq+PM5OZ1T9FEasgzMBexa1aZv8g5jbq6Ak9Q/XU7JelLvtUzu39FdF6oy+BTUPKKqpN1Z09OpCWrMmOQZDkQcVDwqhMIaQ6Yp5Kz7hzIL+VeVozgabW6B8thEe/tb/lBqc1hq/Ypy/MGbyu27BlwIe60l4uZ7I/gaXQCxUOAJa9pK03bXozBa+j1+ysoVmeO3G6dXRKMoySnE8iYIVXnzfhlXRrDHyH7UbG3TOOdxSEKsLfKpmW+v6c/Wxgba6raupiW9+l5uY+PoLzNGCtPz6QfgXDdllHbS1HZXc="