From 200a2c0dad1df63fb25e1fb5ee538f7c14fb5783 Mon Sep 17 00:00:00 2001 From: James Graham <j.graham@soton.ac.uk> Date: Fri, 19 Feb 2021 18:00:58 +0000 Subject: [PATCH] ci: use poetry directly in CI build - skip make --- .github/workflows/python-package.yml | 29 ++++++++++++---------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 37cf4a2..d198baa 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: | -- GitLab