Merge pull request #343 from flairNLP/bump-up-version-to-0.2.0 #815
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
pytest: | |
# Containers must run in Linux based operating systems | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Cache environment | |
uses: actions/cache@master | |
id: cache | |
with: | |
path: ${{ env.pythonLocation }}/lib/python3.8/site-packages/* | |
key: ${{ runner.os }}-packages_only-${{ hashFiles('pyproject.toml') }} | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
pip install -e .[dev] | |
- name: Run pytest | |
run: python -m pytest -vv | |
mypy: | |
# Containers must run in Linux based operating systems | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Cache environment | |
uses: actions/cache@master | |
id: cache | |
with: | |
path: ${{ env.pythonLocation }}/lib/python3.8/site-packages/* | |
key: ${{ runner.os }}-packages_only-${{ hashFiles('pyproject.toml') }} | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
pip install -e .[dev] | |
- name: Run mypy | |
run: python -m mypy . |