fixed integration tests to run on github actions#196
Conversation
📝 WalkthroughWalkthroughConsolidated CI workflows by removing matrix strategies and standardizing on ubuntu-latest; added Node.js verification, unified display/Xvfb setup, adjusted build steps for renderer artifacts, and normalized artifact names. Electron test fixture adds headless GPU flags; Jest integration config ignores release artifacts and disables setupFiles. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions (ubuntu-latest)
participant Build as Build (main + renderer)
participant Test as Playwright/Electron tests
participant Art as Artifact Store / Codecov
Dev->>GH: Push / PR triggers workflow
GH->>Build: Setup Node, update browserslist, build main
GH->>Build: Build renderer (prod env, skip notarization), copy to .erb/renderer
GH->>Test: Setup display (Xvfb), set ELECTRON_DISABLE_GPU, run tests
Test->>Art: Upload test-results and failure-screenshots
GH->>Art: Upload coverage to Codecov
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/e2e-tests.yml:
- Around line 43-51: In the "Build renderer process" GitHub Actions step (the
run block that calls npm run build:renderer and pipes to tee), prepend a strict
shell setting by adding "set -euo pipefail" at the top of the run script so the
pipeline returns the failing command's exit code (this makes the existing "||
(cat build-output.log && exit 1)" behave as intended and causes the job to fail
on npm errors).
| - name: Build renderer process | ||
| run: | | ||
| echo "Building renderer process..." | ||
| npm run build:renderer 2>&1 | tee build-output.log || (cat build-output.log && exit 1) | ||
| env: | ||
| NODE_ENV: production | ||
| # No code signing needed for test builds | ||
| SKIP_NOTARIZATION: 'true' | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n .github/workflows/e2e-tests.yml | sed -n '35,55p'Repository: rosettadb/dbt-studio
Length of output: 882
🏁 Script executed:
#!/bin/bash
# Test to confirm pipeline exit code behavior
echo "=== Testing pipeline exit code WITHOUT pipefail ==="
set +o pipefail # Ensure pipefail is off
(
false | tee /tmp/test.log
exit_code=$?
echo "Exit code: $exit_code"
)
echo ""
echo "=== Testing pipeline exit code WITH pipefail ==="
set -o pipefail # Enable pipefail
(
false | tee /tmp/test.log || true
exit_code=$?
echo "Exit code: $exit_code"
)
echo ""
echo "=== Testing current logic: (false | tee) || echo 'catch block' ==="
set +o pipefail # Back to default
(
false | tee /tmp/test.log || echo "CAUGHT FAILURE"
)Repository: rosettadb/dbt-studio
Length of output: 421
🏁 Script executed:
#!/bin/bash
# Test pipeline exit code behavior using bash builtins
echo "=== Testing: (exit 1) | (exit 0) without pipefail ==="
set +o pipefail
(exit 1) | (exit 0)
echo "Pipeline exit code: $?"
echo ""
echo "=== Testing: (exit 1) | (exit 0) with pipefail ==="
set -o pipefail
(exit 1) | (exit 0)
echo "Pipeline exit code: $?"
echo ""
echo "=== Testing current GitHub Actions pattern ==="
set +o pipefail
(exit 1) | (exit 0) || echo "CAUGHT VIA || CLAUSE"Repository: rosettadb/dbt-studio
Length of output: 261
Add set -euo pipefail to properly fail on build errors.
The pipeline without pipefail returns tee's exit code (0), masking npm failures. The current || (cat build-output.log && exit 1) clause never executes because the pipeline always succeeds from bash's perspective. Enabling pipefail ensures the pipeline returns the exit code of the first failing command.
Suggested fix
- name: Build renderer process
run: |
+ set -euo pipefail
echo "Building renderer process..."
- npm run build:renderer 2>&1 | tee build-output.log || (cat build-output.log && exit 1)
+ npm run build:renderer 2>&1 | tee build-output.log
env:
NODE_ENV: production
# No code signing needed for test builds
SKIP_NOTARIZATION: 'true'🤖 Prompt for AI Agents
In @.github/workflows/e2e-tests.yml around lines 43 - 51, In the "Build renderer
process" GitHub Actions step (the run block that calls npm run build:renderer
and pipes to tee), prepend a strict shell setting by adding "set -euo pipefail"
at the top of the run script so the pipeline returns the failing command's exit
code (this makes the existing "|| (cat build-output.log && exit 1)" behave as
intended and causes the job to fail on npm errors).
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tests/integration/README.md`:
- Around line 164-166: Remove the temporary debug line "Testing github actions
pipeline?" from the tests/integration/README.md and delete any trailing blank
lines left by it; if that sentence was intended to remain, instead edit it to
use the correct branding by changing "github" to "GitHub" and ensure the line
belongs in the docs contextually.
|
|
||
|
|
||
| Testing github actions pipeline? No newline at end of file |
There was a problem hiding this comment.
Remove debug/test content from documentation.
The line "Testing github actions pipeline?" appears to be temporary debug content added to verify the CI pipeline, but it should not be committed to the repository. Please remove this line and the trailing empty lines.
Additionally, if this line were intended to stay, "github" should be capitalized as "GitHub" (the official brand name).
🧹 Proposed fix to remove debug content
-
-
-Testing github actions pipeline?📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Testing github actions pipeline? |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~166-~166: The official name of this software platform is spelled with a capital “H”.
Context: ... - CI/CD Pipeline Integration Testing github actions pipeline?
(GITHUB)
🤖 Prompt for AI Agents
In `@tests/integration/README.md` around lines 164 - 166, Remove the temporary
debug line "Testing github actions pipeline?" from the
tests/integration/README.md and delete any trailing blank lines left by it; if
that sentence was intended to remain, instead edit it to use the correct
branding by changing "github" to "GitHub" and ensure the line belongs in the
docs contextually.
Summary by CodeRabbit