Skip to content

Commit

Permalink
optimize cache in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos committed Jan 30, 2023
1 parent 0b055e0 commit f7415f7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,22 @@ jobs:
with:
python-version: 3.8 # lint with minimal version supported (3.8 in 18.04)

- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.wheel_dir
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install --upgrade pip wheel setuptools
pip3 install -r requirements-dev.txt -U
pip3 wheel --wheel-dir=~/.wheel_dir pip wheel setuptools
pip3 install --find-links=~/.wheel_dir --upgrade pip wheel setuptools
pip3 wheel --wheel-dir=~/.wheel_dir -r requirements-dev.txt
pip3 install --find-links=~/.wheel_dir --upgrade -r requirements-dev.txt
- name: Check dependency graph
run: |
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,22 @@ jobs:
with:
python-version: 3.8 # lint with minimal version supported (3.8 in 18.04)

- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.wheel_dir
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install --upgrade pip wheel setuptools
pip3 install -r requirements-dev.txt -U
pip3 wheel --wheel-dir=~/.wheel_dir pip wheel setuptools
pip3 install --find-links=~/.wheel_dir --upgrade pip wheel setuptools
pip3 wheel --wheel-dir=~/.wheel_dir -r requirements-dev.txt
pip3 install --find-links=~/.wheel_dir --upgrade -r requirements-dev.txt
- name: Check dependency graph
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ jobs:
- name: Install python dependencies
run: |
python3 -m pip install --upgrade pip setuptools wheel
pip3 wheel --wheel-dir=~/.wheel_dir pip wheel setuptools
pip3 install --find-links=~/.wheel_dir --upgrade pip wheel setuptools
pip3 wheel --wheel-dir=~/.wheel_dir -r requirements.txt
pip3 wheel --wheel-dir=~/.wheel_dir -r requirements-dev.txt
pip3 install --find-links=~/.wheel_dir -r requirements.txt
Expand Down

0 comments on commit f7415f7

Please sign in to comment.