diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 180c1a2..7caba70 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -25,7 +25,20 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - cache: 'pip' + # cache: 'pip' + + - name: Cache virtualenv + uses: actions/cache@v3 + with: + key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-test.txt') }} + path: ./venv + + - name: Create virtualenv + run: | + python -m venv ./venv + source ./venv/bin/activate + echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH + echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV - name: Install dependencies run: |