diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 37cf4a28f6744df507aa827042c053274af94b39..d198baa5fcf9e3aa0f3b1fa5aa612956e722e257 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -27,33 +27,28 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install pre-install dependencies - run: | - python -m pip install --upgrade pip - pip install poetry wheel - poetry config virtualenvs.in-project true - - - name: Cache venv - uses: actions/cache@v2 - with: - path: .venv - key: ${{ matrix.os }}-${{ matrix.python-version }}-venv-${{ hashFiles('poetry.lock') }} + - name: Install Poetry + uses: snok/install-poetry@v1.1.1 - - name: Install project dependencies + - name: Install project and dependencies run: | - poetry install --no-root --extras docs --extras test + poetry install - name: Test with pytest run: | - make test + poetry run pytest --cov=pycgtool --cov-report= + + - name: Lint with flake8 - stop build if fails + run: | + poetry run prospector --strictness veryhigh --test-warnings --tool pyflakes - - name: Lint with flake8 and prospector + - name: Full lint - don't stop build run: | - make lint + poetry run prospector --strictness veryhigh --test-warnings --member-warnings --max-line-length 120 --zero-exit - name: Test that docs build run: | - make docs + SPHINXBUILD="poetry run sphinx-build" make -C docs html - name: Check that test coverage is above 80% run: |