-
Notifications
You must be signed in to change notification settings - Fork 3
Added trigger tests on PRs and implemented issue test #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Junie is failed! Details: ❌ Junie execution returned an empty result. This typically indicates an error during task processing. |
ab9f31c to
da5d8ec
Compare
| - name: Run Integration Tests | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
| TEST_ORG: melotria |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| TEST_ORG: melotria | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| TEST_ORG: ${{ vars.TEST_ORG || 'melotria' }} |
Hardcoding TEST_ORG to melotria makes the test fail if the token doesn't have access to that specific organization. It's better to use a variable or default to the actor's username. Also, ensure GH_TOKEN secret is correctly set in the repository.
|
|
||
| export const e2eConfig: E2EConfig = { | ||
| githubToken: process.env.GITHUB_TOKEN || "", | ||
| org: process.env.TEST_ORG || "melotria", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| org: process.env.TEST_ORG || "melotria", | |
| org: process.env.TEST_ORG || "melotria", |
Consider using a more generic default or providing instructions on how to set TEST_ORG. If the E2E tests are intended to run on a personal fork, the organization name will differ.
| describe("Trigger Junie in Issue", () => { | ||
| let repoName: string; | ||
|
|
||
| beforeAll(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| beforeAll(async () => { | |
| beforeAll(async () => { | |
| try { | |
| repoName = await createTestRepo(); | |
| await setupWorkflow(repoName); | |
| } catch (error) { | |
| console.error("Failed to set up test repository:", error); | |
| throw error; | |
| } | |
| }); |
Adding error handling here will provide clearer logs when repository creation fails (e.g., due to 401 Unauthorized or 404 Not Found), making it easier to debug environment issues.
Added separate functions to call octokit Made waitForPR logic more flexible
a0e4bf5 to
b12b441
Compare
| conditionIncludes | ||
| } from "../client/client"; | ||
|
|
||
| describe("Trigger Junie in Issue", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| describe("Trigger Junie in Issue", () => { | |
| describe.skipIf(!e2eConfig.githubToken)("Trigger Junie in Issue", () => { |
The integration test fails in CI because it requires a GITHUB_TOKEN and a test organization. Skipping it when the token is missing allows the CI to pass for PRs from forks or without these secrets.
No description provided.