Skip to content

Commit

Permalink
Give up 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 49fe122 commit 6877a1f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ 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
python -m nltk.downloader punkt
poetry run 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 +46,7 @@ jobs:
if [[ ${{ matrix.python-version }} == '3.9' ]]; then
poetry install -E spacy
# download the small English pretrained spaCy model needed by spacy analyzer
python -m spacy download en_core_web_sm --upgrade-strategy only-if-needed
poetry run 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 +55,9 @@ jobs:
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
poetry run 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 6877a1f

Please sign in to comment.