Skip to content

Commit

Permalink
Poetry caching
Browse files Browse the repository at this point in the history
  • Loading branch information
tnunamak committed Feb 27, 2024
1 parent 1e8e3ce commit 9122b35
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: |
selfie-ui/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('selfie-ui/**/yarn.lock') }}-${{ hashFiles('selfie-ui/**/*.js', 'selfie-ui/**/*.jsx', 'selfie-ui/**/*.ts', 'selfie-ui/**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('selfie-ui/**/yarn.lock') }}-
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -34,6 +26,16 @@ jobs:
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Cache Poetry virtualenvs and artifacts
uses: actions/cache@v4
with:
path: |
~/.cache/pypoetry/virtualenvs
~/.cache/pypoetry/artifacts
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}-
- name: Install dependencies with Poetry
run: poetry install

Expand All @@ -44,5 +46,14 @@ jobs:
cache: 'yarn'
cache-dependency-path: selfie-ui/yarn.lock

- name: Cache Next.js build artifacts
uses: actions/cache@v4
with:
path: |
selfie-ui/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('selfie-ui/**/yarn.lock') }}-${{ hashFiles('selfie-ui/**/*.js', 'selfie-ui/**/*.jsx', 'selfie-ui/**/*.ts', 'selfie-ui/**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('selfie-ui/**/yarn.lock') }}-
- name: Install dependencies with Yarn
run: sh scripts/build-ui.sh

0 comments on commit 9122b35

Please sign in to comment.