Skip to content

Commit

Permalink
CI: update build mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesBelveze committed Jul 4, 2023
1 parent a2fbf56 commit 04645cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 33 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,23 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Create virtual environment
run: python -m venv venv
- name: Cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.3.1

- name: Activate virtual environment
run: |
ls
source ./venv/bin/activate
- uses: snok/install-poetry@v1
with:
version: 1.3.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f .github/workflows/requirements.txt ]; then pip install -r .github/workflows/requirements.txt; fi
poetry install --with dev
- 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 --exclude=venv
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --exclude=venv --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m spacy download en_core_web_sm
pytest
poetry run task test
17 changes: 0 additions & 17 deletions .github/workflows/requirements.txt

This file was deleted.

0 comments on commit 04645cb

Please sign in to comment.