-
-
Notifications
You must be signed in to change notification settings - Fork 500
Expand file tree
/
Copy pathtest-workflow.sh
More file actions
executable file
·75 lines (63 loc) · 1.77 KB
/
test-workflow.sh
File metadata and controls
executable file
·75 lines (63 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# Test script to simulate GitHub Actions workflow locally
# This verifies that all-events.json is generated before tests run
set -e # Exit on any error
echo "=========================================="
echo "Testing Workflow Steps Locally"
echo "=========================================="
# Clean up any existing generated files
echo ""
echo "Step 1: Cleaning up existing generated files..."
rm -f page/src/misc/all-events.json
rm -f page/src/misc/all-cfps.json
echo "✓ Cleanup complete"
# Install dependencies in page directory
echo ""
echo "Step 2: Installing page dependencies..."
cd page
npm ci
cd ..
echo "✓ Page dependencies installed"
# Install dependencies in tools directory and run mdParser
echo ""
echo "Step 3: Installing tools dependencies..."
cd tools
npm ci
echo "✓ Tools dependencies installed"
# Run mdValidator
echo ""
echo "Step 4: Running mdValidator..."
node mdValidator.js
echo "✓ mdValidator passed"
# Run mdParser
echo ""
echo "Step 5: Running mdParser to generate all-events.json..."
node mdParser.js
cd ..
# Verify all-events.json was created
if [ ! -f "page/src/misc/all-events.json" ]; then
echo "❌ ERROR: all-events.json was not created!"
exit 1
fi
echo "✓ all-events.json created successfully"
# Show file info
echo ""
echo "Generated file info:"
ls -lh page/src/misc/all-events.json
echo ""
wc -l page/src/misc/all-events.json
# Run tests
echo ""
echo "Step 6: Running tests..."
cd page
npm test -- --run
cd ..
echo ""
echo "=========================================="
echo "✅ All steps completed successfully!"
echo "=========================================="
echo ""
echo "This confirms the workflow will work correctly:"
echo "1. mdParser.js generates all-events.json"
echo "2. Tests can import and use all-events.json"
echo ""