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

Allow compiling packages in a CI environment #74

Merged
merged 6 commits into from
Dec 28, 2023

Conversation

danjohnson95
Copy link
Contributor

Currently, we're unable to compile a NativePHP application in a CI environment (ie GitHub Actions) because dev/tty is not writable.

This change introduces a new --ci flag to the following commands:

  • native:install
  • native:build
  • native:publish

This fixes NativePHP/laravel#179 and allows compiling in a CI environment

@LukeTowers
Copy link
Contributor

Would --no-interaction be a more standard flag to pass?

@danjohnson95
Copy link
Contributor Author

Nice suggestion, thanks. I've updated the commands to use a --no-interaction flag instead

@GITSKayDomrose
Copy link

GITSKayDomrose commented Sep 18, 2023

GitHub and GitLab (and probably other) set CI=true as global environment variable during pipeline.

Maybe check for this as well?
Would be nice to not have to set it manually.

@mpociot
Copy link
Member

mpociot commented Sep 21, 2023

@GITSKayDomrose do you know how other build tools handle this?
Should this flag just be set automatically if the environment variable is set to true? Would be interesting to know how it works in other systems.

@GITSKayDomrose
Copy link

@GITSKayDomrose do you know how other build tools handle this? Should this flag just be set automatically if the environment variable is set to true? Would be interesting to know how it works in other systems.

Jest has an --ci option, that is also used by this environment variable and changes how it handles snapshots.
Other than that i don't know any tool by name, but i believe its a common pattern.

I think there should be a dedicated "no-interaction"-mode that could be triggered with a flag or set automatically with CI=true, but i think this is out of scope for this MR.
So for a quick help this is a good first step.

@danjohnson95
Copy link
Contributor Author

What changes are required to get this merged in?

sweptsquash added a commit to sweptsquash/electron-ci that referenced this pull request Dec 1, 2023
@LukeTowers
Copy link
Contributor

@mpociot any chance we could get this merged? It's blocking the larajobs desktop notifier from being able to be compiled for release ❤️

@mpociot mpociot merged commit e94a7ba into NativePHP:main Dec 28, 2023
@mpociot
Copy link
Member

mpociot commented Dec 28, 2023

Oh definitely. Sorry for the delay

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 this pull request may close these issues.

[Bug]: Can't build package in CI environment
4 participants