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: "roave-backwards-compatibility-check" should not be run if "github.base_ref" not set #297

Open
asgrim opened this issue Nov 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@asgrim
Copy link
Collaborator

asgrim commented Nov 14, 2022

Currently roave-backwards-compatibility-check runs always, but because the script wrapper we have, which swallows errors (which is a problem in itself), we don't notice when github.base_ref is not set.

Example:

https://github.com/scoutapp/scout-apm-php/actions/runs/3461969241/jobs/5780869417

  .github/workflows/roave-backwards-compatibility-check.sh --install-development-dependencies --from=origin/
  shell: /usr/bin/bash -e {0}
  env:
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
Running BC check, please wait...

In execute.php line 156:
                                                                               
  Shell command "git 'rev-parse' 'origin/'" returned an exit code of "128".    
                                                                               
  STDOUT:                                                                      
      origin/                                                                  
                                                                               
                                                                               
  STDERR:                                                                      
      fatal: ambiguous argument 'origin/': unknown revision or path not in the working tree.                                                              
      Use '--' to separate paths from revisions, like this:                    
      'git <command> [<revision>...] -- [<file>...]'                           
                                                                               

roave-backwards-compatibility-check:assert-backwards-compatible [--from [FROM]] [--to TO] [--format [FORMAT]] [--install-development-dependencies]
Lines with [BC] not filtered: 0
Stated breaks: roave-backwards-compatibility-check:assert-backwards-compatible out of expected 2
EXIT 0

Two things to fix here:

  • The wrapper script should fail if the tool fails (to avoid false positives)
  • The CI job should be skipped if github.base_ref is not set
@asgrim asgrim added the bug Something isn't working label Nov 14, 2022
@asgrim
Copy link
Collaborator Author

asgrim commented Nov 16, 2022

Note: roave-backwards-compatibility-check.sh script can probably be dropped now too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant