@@ -14,17 +14,18 @@ jobs:
1414 - name : Checkout code
1515 uses : actions/checkout@v4
1616
17- - name : Setup Python
18- uses : actions/setup-python @v4
17+ - name : Setup Node.js
18+ uses : actions/setup-node @v4
1919 with :
20- python -version : ' 3.x '
20+ node -version : ' 18 '
2121
22- - name : Setup Just
23- uses : extractions/setup-just@v3
24-
25- - name : Check project structure
22+ - name : Install dependencies
23+ run : |
24+ npm ci
25+
26+ - name : Validate project (structure, files, outputs)
2627 run : |
27- just check-structure
28+ node scripts/validate.js
2829
2930 - name : Validate file syntax
3031 run : |
3435 # Check JavaScript files for basic syntax
3536 find src/js -name "*.js" | xargs -I {} sh -c 'echo "Checking {}" && node -c {}'
3637
37- - name : Test comment preservation
38- run : |
39- just test-comments
40-
41- - name : Run complete validation
42- run : |
43- just check-all
38+ # Additional checks can be added here (lint/tests) when available
4439
4540 - name : Check documentation
4641 run : |
@@ -56,32 +51,41 @@ jobs:
5651
5752 - name : Verify build artifacts
5853 run : |
59- just build-new
60-
54+ npm run build
55+
6156 # Check that build produces expected files
62- test -f json-format-converter-extension.zip || (echo "Extension ZIP not created" && exit 1)
57+ test -f json-format-converter-chrome.zip || (echo "Chrome ZIP not created" && exit 1)
58+ test -f json-format-converter-firefox.zip || (echo "Firefox ZIP not created" && exit 1)
6359 test -f json-format-converter-standalone.zip || (echo "Standalone ZIP not created" && exit 1)
64- test -d dist/extension || (echo "Extension build directory missing" && exit 1)
60+ test -d dist/chrome || (echo "Chrome build directory missing" && exit 1)
61+ test -d dist/firefox || (echo "Firefox build directory missing" && exit 1)
6562 test -d dist/standalone || (echo "Standalone build directory missing" && exit 1)
66-
63+
6764 # Check ZIP file contents
68- unzip -t json-format-converter-extension.zip > /dev/null || (echo "Extension ZIP is corrupted" && exit 1)
65+ unzip -t json-format-converter-chrome.zip > /dev/null || (echo "Chrome ZIP is corrupted" && exit 1)
66+ unzip -t json-format-converter-firefox.zip > /dev/null || (echo "Firefox ZIP is corrupted" && exit 1)
6967 unzip -t json-format-converter-standalone.zip > /dev/null || (echo "Standalone ZIP is corrupted" && exit 1)
7068
7169 - name : Check package sizes
7270 run : |
7371 echo "📊 Package Sizes:"
74- echo "Extension: $(du -h json-format-converter-extension.zip | cut -f1)"
72+ echo "Chrome: $(du -h json-format-converter-chrome.zip | cut -f1)"
73+ echo "Firefox: $(du -h json-format-converter-firefox.zip | cut -f1)"
7574 echo "Standalone: $(du -h json-format-converter-standalone.zip | cut -f1)"
7675
7776 # Warn if packages are too large (>500KB)
78- ext_size=$(stat -c%s json-format-converter-extension.zip)
77+ chrome_size=$(stat -c%s json-format-converter-chrome.zip)
78+ firefox_size=$(stat -c%s json-format-converter-firefox.zip)
7979 standalone_size=$(stat -c%s json-format-converter-standalone.zip)
8080
81- if [ $ext_size -gt 512000 ]; then
82- echo "⚠️ Warning: Extension package is larger than 500KB ($ext_size bytes)"
81+ if [ $chrome_size -gt 512000 ]; then
82+ echo "⚠️ Warning: Chrome package is larger than 500KB ($chrome_size bytes)"
8383 fi
8484
85+ if [ $firefox_size -gt 512000 ]; then
86+ echo "⚠️ Warning: Firefox package is larger than 500KB ($firefox_size bytes)"
87+ fi
88+
8589 if [ $standalone_size -gt 512000 ]; then
8690 echo "⚠️ Warning: Standalone package is larger than 500KB ($standalone_size bytes)"
8791 fi
0 commit comments