Skip to content

Commit 19203ee

Browse files
committed
ci: Ensure downloads directory exists before running recordings tests
1 parent de29e98 commit 19203ee

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/e2e-components-angular-tutorials.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,8 @@ jobs:
8585
- name: Run Recordings Tests
8686
env:
8787
LAUNCH_MODE: CI
88-
run: npm run e2e:recordings --prefix openvidu-components-angular/openvidu-demo-app/frontend
88+
run: |
89+
# Create downloads directory
90+
mkdir -p /tmp/openvidu-components-angular-demo-app-downloads
91+
npm run e2e:recordings --prefix openvidu-components-angular/openvidu-demo-app/frontend
8992

openvidu-components-angular/openvidu-demo-app/frontend/e2e/recording.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ describe('Testing recordings', () => {
7979

8080
// Check if the file is downloaded
8181
const downloadsDir = OpenViduDemoAppConfig.downloadsDir;
82+
83+
// Ensure the downloads directory exists
84+
if (!fs.existsSync(downloadsDir)) {
85+
fs.mkdirSync(downloadsDir, { recursive: true });
86+
}
87+
8288
const files = fs.readdirSync(downloadsDir);
8389
const downloadedFile = files.find((file) => file.includes('Room-') && file.endsWith('.mp4'));
8490

0 commit comments

Comments
 (0)