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

Infection develop fails #333

Open
kenjis opened this issue Nov 12, 2022 · 3 comments · Fixed by #348
Open

Infection develop fails #333

kenjis opened this issue Nov 12, 2022 · 3 comments · Fixed by #348

Comments

@kenjis
Copy link
Contributor

kenjis commented Nov 12, 2022

See https://github.com/codeigniter4projects/website/actions/workflows/infection.yml?query=branch%3Adevelop

Run git fetch --depth=1 origin $GITHUB_BASE_REF
  git fetch --depth=1 origin $GITHUB_BASE_REF
  infection --threads=2 --skip-initial-tests --coverage=build/phpunit --git-diff-base=origin/$GITHUB_BASE_REF --git-diff-filter=AM --logger-github --ignore-msi-with-no-mutations
  shell: /usr/bin/bash -e {0}
  env:
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_AUTH: {"github-oauth": {"github.com": "***"}}
From https://github.com/codeigniter4projects/website
 * [new branch]      dependabot/composer/codeigniter4/devkit-1.1.0 -> origin/dependabot/composer/codeigniter4/devkit-1.1.0
 * [new branch]      dependabot/composer/codeigniter4/framework-4.2.6 -> origin/dependabot/composer/codeigniter4/framework-4.2.6
 * [new branch]      master     -> origin/master

In Process.php line 112:
                                                                               
  The command "'git' 'diff' 'origin/' '--diff-filter' 'AM' '--name-only' '--'  
   'app/'" failed.                                                             
                                                                               
  Exit Code: 128(Invalid exit argument)                                        
                                                                               
  Working directory: /home/runner/work/website/website                         
                                                                               
  Output:                                                                      
  ================                                                             
                                                                               
                                                                               
  Error Output:                                                                
  ================                                                             
  fatal: bad revision 'origin/'                                                
                                                                               

run [--test-framework TEST-FRAMEWORK] [--test-framework-options TEST-FRAMEWORK-OPTIONS] [-j|--threads THREADS] [--only-covered] [-s|--show-mutations] [--no-progress] [--force-progress] [-c|--configuration CONFIGURATION] [--coverage COVERAGE] [--mutators MUTATORS] [--filter FILTER] [--formatter FORMATTER] [--git-diff-filter GIT-DIFF-FILTER] [--git-diff-lines] [--git-diff-base GIT-DIFF-BASE] [--logger-github [LOGGER-GITHUB]] [--logger-html LOGGER-HTML] [--noop] [--only-covering-test-cases] [--min-msi MIN-MSI] [--min-covered-msi MIN-COVERED-MSI] [--log-verbosity LOG-VERBOSITY] [--initial-tests-php-options INITIAL-TESTS-PHP-OPTIONS] [--skip-initial-tests] [--ignore-msi-with-no-mutations] [--debug] [--dry-run]

Error: Process completed with exit code 1.
@MGatner
Copy link
Collaborator

MGatner commented Nov 12, 2022

I've been seeing this on my own repos. I haven't looked into it yet, but it isn't something specific to this project.

@kenjis
Copy link
Contributor Author

kenjis commented Dec 25, 2022

I don't know why, but failed again in develop.

Run git fetch --depth=1 origin $GITHUB_BASE_REF
From https://github.com/codeigniter4projects/website
 * [new branch]      MGatner-patch-1 -> origin/MGatner-patch-1
 * [new branch]      master          -> origin/master

In Process.php line 112:
                                                                               
  The command "'git' 'diff' 'origin/' '--diff-filter' 'AM' '--name-only' '--'  
   'app/'" failed.                                                             
                                                                               
  Exit Code: 128(Invalid exit argument)                                        
                                                                               
  Working directory: /home/runner/work/website/website                         
                                                                               
  Output:                                                                      
  ================                                                             
                                                                               
                                                                               
  Error Output:                                                                
  ================                                                             
  fatal: bad revision 'origin/'                                                
                                                                               

run [--test-framework TEST-FRAMEWORK] [--test-framework-options TEST-FRAMEWORK-OPTIONS] [-j|--threads THREADS] [--only-covered] [-s|--show-mutations] [--no-progress] [--force-progress] [-c|--configuration CONFIGURATION] [--coverage COVERAGE] [--mutators MUTATORS] [--filter FILTER] [--formatter FORMATTER] [--git-diff-filter GIT-DIFF-FILTER] [--git-diff-lines] [--git-diff-base GIT-DIFF-BASE] [--logger-github [LOGGER-GITHUB]] [--logger-html LOGGER-HTML] [--noop] [--only-covering-test-cases] [--min-msi MIN-MSI] [--min-covered-msi MIN-COVERED-MSI] [--log-verbosity LOG-VERBOSITY] [--initial-tests-php-options INITIAL-TESTS-PHP-OPTIONS] [--skip-initial-tests] [--ignore-msi-with-no-mutations] [--debug] [--dry-run]

Error: Process completed with exit code 1.

https://github.com/codeigniter4projects/website/actions/runs/3775321195/jobs/6417937578

@kenjis kenjis reopened this Dec 25, 2022
@kenjis
Copy link
Contributor Author

kenjis commented Jun 4, 2023

I found the cause. $GITHUB_BASE_REF does work only on PR.
See codeigniter4/tasks#107

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