Skip to content
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

E2e tests improvements #269

Closed
4 of 6 tasks
laurentsimon opened this issue May 9, 2022 · 7 comments · Fixed by #948
Closed
4 of 6 tasks

E2e tests improvements #269

laurentsimon opened this issue May 9, 2022 · 7 comments · Fixed by #948
Assignees

Comments

@laurentsimon
Copy link
Contributor

laurentsimon commented May 9, 2022

  • Re-use existing issue instead of creating new one (Disable gostaging until this is done: we're inundated with issues otherwise)
  • Verify push/dispatch_workflow work properly
  • Auto-close issues when e2e tests pass
  • Fix the content which contains \n instead of displaying a new line
  • Links to workflow files are broken
  • Provide the token type in the issue description (PAT or GITHUB_TOKEN)
@laurentsimon
Copy link
Contributor Author

/cc @naveensrinivasan @azeemsgoogle

@laurentsimon
Copy link
Contributor Author

laurentsimon commented May 9, 2022

I looked at the e2e2 workflows (only the non-gostaging ones). Findings:

  1. https://github.com/ossf-tests/scorecard-action/blob/main/.github/workflows/Scorecards-with-default-GH-Token-main.ym is triggering the main https://github.com/ossf-tests/scorecard-action/blob/main/.github/workflows/scorecards.yml via https://github.com/ossf-tests/scorecard-action/blob/main/.github/workflows/workflowdispatch.yml#L32. The code in https://github.com/ossf-tests/scorecard-action/blob/main/.github/workflows/workflowdispatch.yml#L47 is only run if the dispatch event is not delivered, but not if the Action result fails. We need to update the issue messages in https://github.com/ossf-tests/scorecard-action/blob/main/.github/workflows/scorecards.yml#L68 with the correct trigger events, etc

  2. We don't have tests for the push event. We need something similar to https://github.com/ossf-tests/scorecard-action/blob/main/.github/workflows/workflowdispatch.yml#L32 but to trigger a push. See this code as example https://github.com/slsa-framework/example-package/blob/main/.github/workflows/scripts/e2e-push.sh: you need to commit some random data to the repo to simulate a push.

@naveensrinivasan WDUT?

@laurentsimon
Copy link
Contributor Author

Follow-up: I think the first item Re-use existing issue instead of creating new one is important because we get drowned into the number of created issues atm.

@azeemshaikh38
Copy link
Contributor

@laurentsimon you had mentioned you have a script for re-using existing issues? Could you point me to that?

@azeemshaikh38
Copy link
Contributor

azeemshaikh38 commented Sep 12, 2022

Some more e2e tests needed given recent bugs:

  • Create a single issue per workflow instead per-matrix value to reduce noise.
  • Add tests for a repository with Branch-Protection settings enabled.
  • Add tests for Branch-Protection event trigger.
  • Add tests for PAT based workflows.

@azeemshaikh38
Copy link
Contributor

@spencerschrock when you add e2e for #856 this issue can be resolved too. 2 things I'm not implementing and skipping: (i) Re-use existing issue instead of creating new one and (ii) Auto-close issues when e2e tests pass.

If we really need that capability, lets re-assess and open new issues for those.

@azeemshaikh38 azeemshaikh38 self-assigned this Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants