Skip to content

Commit

Permalink
Python CI, Next.js caching
Browse files Browse the repository at this point in the history
  • Loading branch information
tnunamak committed Feb 27, 2024
1 parent 0af612f commit 2faa991
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,35 @@ jobs:
node-version: [18, 20]

steps:
- uses: actions/checkout@v3
- 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
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies with Poetry
run: poetry install

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: selfie-ui/yarn.lock

- run: sh scripts/build-ui.sh
- name: Install dependencies with Yarn
run: sh scripts/build-ui.sh

0 comments on commit 2faa991

Please sign in to comment.