-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (35 loc) · 1.45 KB
/
pythonapp.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build, Test, and Package
on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
build:
name: Build and Test Environment
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- name: Set up Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: nlp_env
environment-file: dev_environment.yml
python-version: 3.7
auto-activate-base: false
- name: Run Unit Tests
shell: bash -l {0}
run: |
conda activate nlp_env && pytest --junitxml=results.xml --cov=nlprov --cov-report xml nlprov/test
- name: Upload Coverage Report
uses: codecov/codecov-action@v2
- name: Lint Tutorial Notebook
shell: bash -l {0}
run: |
pip install jupyter && pip install flake8 && jupyter nbconvert tutorial.ipynb --to script --stdout | flake8 - --ignore=W391
- name: Run Packaging Step
shell: bash -l {0}
run: |
python -m pip install --user --upgrade setuptools wheel && python setup.py sdist bdist_wheel && python -m pip install --user dist/nlprov-1.1.0-py3-none-any.whl && python -m spacy download en_core_web_sm && python nlp_example.py