From cb51057ce8f4cf66b91799f7189cb67bc4cb05c9 Mon Sep 17 00:00:00 2001 From: DamKas <48238600+DamKast@users.noreply.github.com> Date: Fri, 21 Jun 2024 11:58:20 +0400 Subject: [PATCH] update pytest job --- .github/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60609c1..99adbae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -157,21 +157,24 @@ jobs: - name: Check out code from GitHub uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v2 id: python with: python-version: ${{ matrix.python-version }} - allow-prereleases: true - name: Restore base Python virtual environment id: cache-venv uses: actions/cache@v2 with: - fail-on-cache-miss: true path: venv key: >- ${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-${{ - hashFiles('setup.py', 'requirements_test.txt', 'requirements.txt', 'pyproject.toml', 'setup.cfg') }} + hashFiles('pyproject.toml') }} + - name: Fail job if Python cache restore failed + if: steps.cache-venv.outputs.cache-hit != 'true' + run: | + echo "Failed to restore Python virtual environment from cache" + exit 1 - name: Register Python problem matcher run: | echo "::add-matcher::.github/workflows/matchers/python.json"