From 27ea7e2bdb03386d88915b990376f2f89077c351 Mon Sep 17 00:00:00 2001 From: Mohamed Nasser Date: Tue, 11 Jun 2024 05:01:07 +0300 Subject: [PATCH] added caching and fix error --- .github/workflows/lint.yaml | 12 +++++++++++- .github/workflows/pytest-actions.yaml | 15 ++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index b77d579..c7d816d 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -20,7 +20,17 @@ jobs: - name: Install Poetry uses: Gr1N/setup-poetry@v8 with: - poetry-version: '1.2.2' # Specify the Poetry version you need + poetry-version: '1.8.3' + + - name: Cache Poetry dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cache/pypoetry + ~/.virtualenvs + key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} + restore-keys: | + ${{ runner.os }}-poetry- - name: Install dependencies run: poetry install diff --git a/.github/workflows/pytest-actions.yaml b/.github/workflows/pytest-actions.yaml index f2bdddb..ea67075 100755 --- a/.github/workflows/pytest-actions.yaml +++ b/.github/workflows/pytest-actions.yaml @@ -30,7 +30,20 @@ jobs: - name: Install Poetry uses: Gr1N/setup-poetry@v8 with: - poetry-version: '1.2.2' # Specify the Poetry version you need + poetry-version: '1.8.3' # Specify the Poetry version you need + + - name: Cache Poetry dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cache/pypoetry + ~/.virtualenvs + key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} + restore-keys: | + ${{ runner.os }}-poetry- + + - name: Update lock file + run: poetry lock --no-update - name: Install dependencies run: poetry install