Retrigger build #24
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
name: Pytest | |
on: | |
push: | |
paths: | |
- "**/*.py" | |
- "tests/" | |
- "pyproject.toml" | |
- "poetry.lock" | |
- ".github/workflows/pytest.yml" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
env: | |
LT_HOME: foo/lt/home | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Poetry | |
uses: Gr1N/setup-poetry@v8 | |
- name: Cache Poetry virtualenv | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
- name: Check Poetry config | |
run: poetry check | |
- name: Install dependencies | |
run: poetry install --with test | |
env: | |
POETRY_HTTP_BASIC_GITLAB_USERNAME: "lt-ai-package-registry" | |
POETRY_HTTP_BASIC_GITLAB_PASSWORD: ${{ secrets.POETRY_HTTP_BASIC_GITLAB_PASSWORD }} | |
- name: Install spaCy pipeline | |
run: poetry run spacy download pt_core_news_sm | |
- name: Pytest | |
uses: pavelzw/pytest-action@v2 | |
with: | |
custom-pytest: "poetry run pytest test" | |
emoji: true | |
verbose: true | |
job-summary: true |