Skip to content

Commit 9db2da8

Browse files
committed
fix(ci):changed working directory of lighthouse
1 parent 4ba51bd commit 9db2da8

File tree

1 file changed

+37
-35
lines changed

1 file changed

+37
-35
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -135,38 +135,40 @@ jobs:
135135
env:
136136
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
137137

138-
lighthouse:
139-
name: Lighthouse CI
140-
runs-on: ubuntu-latest
141-
needs: build
142-
steps:
143-
- name: Checkout code
144-
uses: actions/checkout@v4
145-
146-
- name: Setup Node.js
147-
uses: actions/setup-node@v4
148-
with:
149-
node-version: ${{ env.NODE_VERSION }}
150-
cache: "npm"
151-
152-
- name: Install dependencies
153-
run: npm ci
154-
155-
- name: Download build artifacts
156-
uses: actions/download-artifact@v4
157-
with:
158-
name: build-artifacts
159-
path: .next/*
160-
161-
- name: Start application server
162-
run: npm start & # Use '&' to run in background
163-
working-directory: .
164-
165-
- name: Run Lighthouse CI
166-
uses: treosh/lighthouse-ci-action@v12
167-
with:
168-
urls: |
169-
http://localhost:3000
170-
uploadArtifacts: true
171-
temporaryPublicStorage: true
172-
continue-on-error: true
138+
lighthouse:
139+
name: Lighthouse CI
140+
runs-on: ubuntu-latest
141+
needs: build
142+
steps:
143+
- name: Checkout code
144+
uses: actions/checkout@v4
145+
146+
- name: Setup Node.js
147+
uses: actions/setup-node@v4
148+
with:
149+
node-version: ${{ env.NODE_VERSION }}
150+
cache: "npm"
151+
152+
- name: Install dependencies
153+
run: npm ci
154+
155+
- name: Download build artifacts
156+
uses: actions/download-artifact@v4
157+
with:
158+
name: build-artifacts
159+
path: .next
160+
161+
- name: Start application server
162+
run: npm start & #
163+
164+
- name: Wait for server to be ready
165+
run: sleep 10
166+
167+
- name: Run Lighthouse CI
168+
uses: treosh/lighthouse-ci-action@v12
169+
with:
170+
urls: |
171+
http://localhost:3000
172+
uploadArtifacts: true
173+
temporaryPublicStorage: true
174+
continue-on-error: true

0 commit comments

Comments
 (0)