Skip to content

Commit

Permalink
Try installing packages system-wide in GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
juhoinkinen committed Aug 11, 2022
1 parent fb7dd5d commit 49fe122
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
- '*'
pull_request:
workflow_dispatch:
env:
POETRY_VIRTUALENVS_CREATE: false
jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -31,10 +29,12 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@2bf112a0f6979928eb6b011f39700db589c5961e # v1.3.1
with:
virtualenvs-create: false
- name: Install Python dependencies
run: |
poetry install --no-interaction --no-root
poetry run python -m nltk.downloader punkt
python -m nltk.downloader punkt
# Selectively install the optional dependencies for some Python versions
# Install the optional neural network dependencies (TensorFlow and LMDB)
# - except for one Python version (3.9) so that we can test also without them
Expand All @@ -48,7 +48,7 @@ jobs:
if [[ ${{ matrix.python-version }} == '3.9' ]]; then
poetry install -E spacy
# download the small English pretrained spaCy model needed by spacy analyzer
poetry run python -m spacy download en_core_web_sm --upgrade-strategy only-if-needed
python -m spacy download en_core_web_sm --upgrade-strategy only-if-needed
fi
# For Python 3.8
# - voikko and pycld3 dependencies
Expand All @@ -57,9 +57,9 @@ jobs:
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
poetry run pytest --cov=./ --cov-report xml
Expand Down

0 comments on commit 49fe122

Please sign in to comment.