Skip to content

Commit 00e8682

Browse files
committed
fix(ci): add debugging and conditional artifact uploads to resolve E2E test failures
1 parent cde7019 commit 00e8682

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,16 @@ jobs:
8383
- name: Build application
8484
run: npm run build
8585

86+
- name: List build directory contents
87+
run: |
88+
echo "Checking if .next directory exists:"
89+
ls -la .next/ || echo ".next directory not found"
90+
echo "Checking if build was successful:"
91+
ls -la .next/static/ || echo "static directory not found"
92+
8693
- name: Upload build artifacts
8794
uses: actions/upload-artifact@v4
95+
if: success()
8896
with:
8997
name: build-files
9098
path: .next/
@@ -114,6 +122,13 @@ jobs:
114122
name: build-files
115123
path: .next/
116124

125+
- name: Verify build artifacts
126+
run: |
127+
echo "Checking downloaded artifacts:"
128+
ls -la .next/ || echo ".next directory not found after download"
129+
echo "Checking if static files exist:"
130+
ls -la .next/static/ || echo "static directory not found"
131+
117132
- name: Start application
118133
run: npm start &
119134

@@ -131,15 +146,15 @@ jobs:
131146

132147
- name: Upload Cypress screenshots
133148
uses: actions/upload-artifact@v4
134-
if: failure()
149+
if: failure() && hashFiles('cypress/screenshots/**/*') != ''
135150
with:
136151
name: cypress-screenshots
137152
path: cypress/screenshots/
138153
retention-days: 7
139154

140155
- name: Upload Cypress videos
141156
uses: actions/upload-artifact@v4
142-
if: always()
157+
if: always() && hashFiles('cypress/videos/**/*') != ''
143158
with:
144159
name: cypress-videos
145160
path: cypress/videos/

0 commit comments

Comments
 (0)