Skip to content

Typing

Typing #370

Workflow file for this run

# 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: TorchSeq
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m nltk.downloader wordnet
python -m nltk.downloader omw-1.4
pip install .
- name: Lint with flake8
run: |
pip install flake8 black
# stop the build if there are Python syntax errors or undefined names
# flake8 ./torchseq --count --select=E9,F63,F7,F82 --show-source --statistics
make syntax
make check
- name: Test with pytest
run: |
pip install pytest pytest-cov codecov
make test
- name: Check types
run: |
pip install mypy
mypy ./torchseq --install-types --non-interactive
# - name: Upload coverage
# run: |
# make coverage