use setup cache option instead of action

This commit is contained in:
Anurag Chauhan
2021-11-25 10:03:14 +00:00
committed by GitHub
parent cb87b05b73
commit b4ee598043
+1 -8
View File
@@ -40,20 +40,13 @@ jobs:
uses: actions/[email protected] uses: actions/[email protected]
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
- name: Create and start virtual environment - name: Create and start virtual environment
run: | run: |
python -m venv venv python -m venv venv
source venv/bin/activate source venv/bin/activate
- name: Set up dependency caching for faster installs
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt run: pip install -r requirements.txt