-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (52 loc) · 1.75 KB
/
testpython.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
name: Test Python Code and Scripts
on: [pull_request]
jobs:
test_python_code:
name: Lint and Test Python Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install and Set Up Data
run: |
pip install invoke
invoke install-all
invoke download-nltk-data
- name: Lint and Format Code
run: |
invoke check-format
invoke lint
- name: Test Python Code
run: invoke test
# TODO: add codecov step once we have a token: https://github.com/codecov/codecov-action
test_script_runs:
name: Test Python Scripts Run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install and Set Up Data
run: |
pip install invoke
invoke install-all
invoke download-nltk-data
cp ips_python/tests/test_data/sample_test_data.csv data/all_downloaded_records.csv
- name: Check Scripts Run
run: |
# these are all of the scripts that have been refactored to fit in with the
# modularized structure.
# we simply want to be sure that these script's __main__ functions work without error
python ips_python/preprocessing.py
python ips_python/vectorize.py
python ips_python/cosine.py
python ips_python/refinement.py
python ips_python/script.py
python ips_python/word2vecmodel.py
python ips_python/word2vecaverage.py
python ips_python/word2veccosine.py