Use setup-python action to cache dependencies (#9159)

Signed-off-by: jongwooo <jongwooo.han@gmail.com>

## Details

Updated workflows to cache dependencies using
[actions/setup-python](https://github.com/actions/setup-python#caching-packages-dependencies).
`setup-python@v3` or newer has caching **built-in**.

### AS-IS

```yaml
- name: Setup python environment
  uses: actions/setup-python@v3
  with:
    python-version: 3.8
```

### TO-BE

```yaml
- name: Setup python environment
  uses: actions/setup-python@v3
  with:
    python-version: 3.8
    cache: pip
    cache-dependency-path: |
      infra/ci/requirements.txt
      infra/build/functions/requirements.txt
      infra/cifuzz/requirements.txt
```

## References

-
[https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows)
-
[https://thearchivelog.dev/article/caching-dependencies-to-speed-up-workflows/](https://thearchivelog.dev/article/caching-dependencies-to-speed-up-workflows/)

Signed-off-by: jongwooo <jongwooo.han@gmail.com>
This commit is contained in:
Jongwoo Han 2023-01-31 02:09:06 +09:00 committed by GitHub
parent b452496404
commit 58ad90a61a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -29,6 +29,10 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: 3.8
cache: pip
cache-dependency-path: |
infra/ci/requirements.txt
infra/build/functions/requirements.txt
- name: Install dependencies
run: |

View File

@ -73,6 +73,9 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: 3.8
cache: pip
cache-dependency-path: |
infra/ci/requirements.txt
- name: Install dependencies
run: |