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

[Question] Can we make CI failed right away when commit linter fails? #2742

Closed
dhmlau opened this issue Apr 12, 2019 · 4 comments
Closed

[Question] Can we make CI failed right away when commit linter fails? #2742

dhmlau opened this issue Apr 12, 2019 · 4 comments
Labels
Internal Tooling Issues related to our tooling and monorepo infrastructore stale

Comments

@dhmlau
Copy link
Member

dhmlau commented Apr 12, 2019

Description / Steps to reproduce / Feature proposal

When the commit message of a PR does not adhere to the commit message guideline, Travis for other tests are still trying to run. I've encountered a few times in some community PRs.

Question: I'm wondering if there's any mechanism to make the Travis CI failed right away in this case instead of trying to finish running all the tests.

Alternatively, when committing, I believe husky will tell us if the commit message does not adhere to our commit message guideline. Perhaps we can make the error more prominent, if possible?

@strongloop/loopback-maintainers , thoughts?

@dhmlau dhmlau added question Internal Tooling Issues related to our tooling and monorepo infrastructore labels Apr 12, 2019
@dhmlau
Copy link
Member Author

dhmlau commented Apr 17, 2019

@bajtos mentioned to look up: https://docs.travis-ci.com

@bajtos
Copy link
Member

bajtos commented Jun 24, 2019

It's possible to divide Travis jobs into stages (see https://docs.travis-ci.com/user/build-stages/):

  1. The first sequence runs commit linter only. If it fails then the build is aborted.
  2. The first sequence runs all other jobs in parallel, no change from today.

The downside of such configuration is that successful builds will take longer to complete, because the commit linter is no longer executed in parallel with other jobs. Personally, I am reluctant to slow down successful builds.

Also conceptually, even if the commit message is malformed, I often want to see the actual npm test output, so that we can discuss the code changes regardless of metadata like commit messages. Commit message can be usually cleaned up by ourselves, so it's not a big deal if they are not correct on the first try (IMO).

If we eventually jump on Azure Pipelines (see #3161), then it may be easier to show a failed check for commit linters, because AFAIK Azure Pipelines report one GH check for each job in the build matrix (as opposed to Travis).

@stale
Copy link

stale bot commented Jun 20, 2020

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

@stale stale bot added the stale label Jun 20, 2020
@stale
Copy link

stale bot commented Jul 20, 2020

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal Tooling Issues related to our tooling and monorepo infrastructore stale
Projects
None yet
Development

No branches or pull requests

2 participants