diff --git a/.github/workflows/buildTest.yml b/.github/workflows/buildTest.yml index 2440ad7..341ca9c 100644 --- a/.github/workflows/buildTest.yml +++ b/.github/workflows/buildTest.yml @@ -31,6 +31,24 @@ jobs: node-version: 20 cache: 'npm' + - name: Create env file + run: | + touch .env.local + echo TURSO_DB_URL="file:local.db" >> .env.local + cat .env.local + + - uses: actions/cache@v4 + with: + # See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node + path: | + ~/.npm + ${{ github.workspace }}/.next/cache + # Generate a new cache whenever packages or source files change. + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- + - name: Install dependencies run: npm install