From 05d4b61e569bc603380584309c437669b990d626 Mon Sep 17 00:00:00 2001 From: Vladislav Date: Fri, 1 Dec 2023 14:18:31 +0500 Subject: [PATCH] Add install poetry step to ci --- .github/workflows/checks.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index cb70731..9d2b391 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -37,18 +37,38 @@ jobs: key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }} restore-keys: | ${{ runner.os }}-pip- - - name: Install Dependencies + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: latest + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Cache poetry dependencies + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + + - name: Install Django run: | pip install 'django${{ matrix.django-version }}' + - name: Prepare env run: | inv ci.prepare + - name: Run checks ${{ matrix.python-version }} run: inv pre-commit.run-hooks + - name: Upload results to coveralls run: | pip install coveralls coveralls --service=github + env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}