ReactiveX / RxPY

ReactiveX for Python
https://rxpy.rtfd.io
MIT License
4.77k stars 361 forks source link

Use setup-python action to cache dependencies #679

Closed jongwooo closed 1 year ago

jongwooo commented 1 year ago

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

Details

Updated workflows to cache dependencies using actions/setup-python. setup-python@v3 or newer has caching built-in.

AS-IS

- name: Set up Python 3.9
  uses: actions/setup-python@v2
  with:
    python-version: 3.9

- name: Cache Poetry
  uses: actions/cache@v2
  with:
    path: |
      ~/.cache/pypoetry
      ~/Library/Caches/pypoetry
      C:\Users\*\AppData\Local\pypoetry\Cache
    key: poetry-cache-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

TO-BE

- name: Set up Python 3.9
  uses: actions/setup-python@v3
  with:
    python-version: 3.9
    cache: poetry

References

dbrattli commented 1 year ago

Why was this PR closed?

jongwooo commented 1 year ago

@dbrattli Thank you for the comment. An error occured while using poetry cache. I think we should to install poetry before set up python. I will create a new PR after checking some things that I need to learn more about.

dbrattli commented 1 year ago

Thanks, that would be great!