From 767b0b4c9f413bfe2707c736394d05ca7746f504 Mon Sep 17 00:00:00 2001 From: David Barroso Date: Fri, 11 Dec 2020 15:12:15 +0100 Subject: [PATCH] fix ci (#4) --- .github/workflows/main.yaml | 42 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7d8e3da..263c1a4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -12,23 +12,22 @@ jobs: uses: actions/setup-python@v1 - name: Install Poetry - uses: dschep/install-poetry-action@v1.2 + uses: snok/install-poetry@v1.1.1 + with: + version: 1.1.4 + virtualenvs-create: true + virtualenvs-in-project: true - name: Cache Poetry virtualenv - uses: actions/cache@v1 - id: cache + uses: actions/cache@v2 + id: cached-poetry-dependencies with: - path: ~/.virtualenvs - key: poetry-linters-${{ hashFiles('**/poetry.lock') }} - restore-keys: poetry-linters-${{ hashFiles('**/poetry.lock') }} - - - name: Set Poetry config - run: | - poetry config virtualenvs.in-project false - poetry config virtualenvs.path ~/.virtualenvs + path: .venv + key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} - name: Install Dependencies run: poetry install + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - name: Run pylama run: make pylama @@ -52,23 +51,22 @@ jobs: architecture: x64 - name: Install Poetry - uses: dschep/install-poetry-action@v1.2 + uses: snok/install-poetry@v1.1.1 + with: + version: 1.1.4 + virtualenvs-create: true + virtualenvs-in-project: true - name: Cache Poetry virtualenv - uses: actions/cache@v1 - id: cache + uses: actions/cache@v2 + id: cached-poetry-dependencies with: - path: ~/.virtualenvs - key: poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - restore-keys: poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - - - name: Set Poetry config - run: | - poetry config virtualenvs.in-project false - poetry config virtualenvs.path ~/.virtualenvs + path: .venv + key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} - name: Install Dependencies run: poetry install + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - name: Run pytest run: make pytest