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

ci: NPM publish package workflow should not be triggered if no tests are executed #4708

Closed
ppawlowski opened this issue Oct 29, 2024 · 0 comments · Fixed by #4848
Closed
Assignees
Labels
needs-triage Needs looking at to decide what to do

Comments

@ppawlowski
Copy link
Contributor

Currently, npm publish package workflow is triggered once the workflow with tests is complete and successful.
If introduced changes include documentation only, workflow with test is triggered but no tests are executed (expected). Unfortunately, in this scenario whole test workflow is considered as one which can trigger npm package publish workflow, due to the workflow_run: configuration.

The goal of this task is to refactor npm public package workflow and add a conditional which confirms that any of the test within Tests workflow completed with success.

Possible solution:

contains(github.event.workflow_run.jobs.*.name, 'Backend Tests') &&
contains(github.event.workflow_run.jobs.*.conclusion, 'success')
@ppawlowski ppawlowski self-assigned this Oct 29, 2024
@ppawlowski ppawlowski added the needs-triage Needs looking at to decide what to do label Oct 29, 2024
@ppawlowski ppawlowski moved this to Todo in 🛠 Development Oct 29, 2024
@ppawlowski ppawlowski moved this from Up Next to Review in 🛠 Development Nov 30, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in 🛠 Development Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Needs looking at to decide what to do
Projects
Status: Closed / Done
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant