Skip to content

Commit

Permalink
Caching poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfior committed Jan 8, 2025
1 parent 0b278ad commit 966c518
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,44 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Load cached Poetry installation
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ runner.os }}
- uses: ./.github/actions/python_prepare
- name: Cache Poetry dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

build_python:
runs-on: ubuntu-latest
needs:
- prepare
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Restore Poetry installation
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ runner.os }}
- name: Restore Poetry dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Run poetry build
run: poetry build -f wheel
run: |
export PATH="$HOME/.local/bin:$PATH"
poetry build -f wheel
build_frontend:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 966c518

Please sign in to comment.