jbilcke-hf HF staff commited on
Commit
e107be0
1 Parent(s): df009e4

another fix..

Browse files
Files changed (2) hide show
  1. .github/workflows/tests.yml +11 -0
  2. next.config.js +9 -0
.github/workflows/tests.yml CHANGED
@@ -17,6 +17,17 @@ jobs:
17
  run: npm ci --force
18
  - name: Install Playwright Browsers
19
  run: npx playwright install --with-deps
 
 
 
 
 
 
 
 
 
 
 
20
  - name: Run build
21
  run: npm run build:ci
22
  - name: Run unit tests
 
17
  run: npm ci --force
18
  - name: Install Playwright Browsers
19
  run: npx playwright install --with-deps
20
+ - uses: actions/cache@v4
21
+ with:
22
+ # 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
23
+ path: |
24
+ ~/.npm
25
+ ${{ github.workspace }}/.next/cache
26
+ # Generate a new cache whenever packages or source files change.
27
+ key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
28
+ # If source files changed but packages didn't, rebuild from a prior cache.
29
+ restore-keys: |
30
+ ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
31
  - name: Run build
32
  run: npm run build:ci
33
  - name: Run unit tests
next.config.js CHANGED
@@ -6,6 +6,15 @@ const nextConfig = {
6
  bodySizeLimit: '32mb'
7
  }
8
  },
 
 
 
 
 
 
 
 
 
9
  async headers() {
10
  return [
11
  {
 
6
  bodySizeLimit: '32mb'
7
  }
8
  },
9
+ images: {
10
+ // temporary fix for:
11
+ //
12
+ // Error: Image import
13
+ // "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/home/runner/work/clapper/clapper/src/app/icon.png?__next_metadata__"
14
+ // is not a valid image file.
15
+ // The image may be corrupted or an unsupported format.
16
+ unoptimized: true,
17
+ },
18
  async headers() {
19
  return [
20
  {