firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

GitHub Action fixes for web frameworks

Open leoortizz opened this issue 1 year ago • 1 comments

Description

  • If user chooses to set up a build script, do not suggest npm ci && npm run build. The reasons are:
    • The user can edit it and drop npm ci, which is required for frameworks.
    • It implies that build is required, but the frameworks code run the build for all frameworks, so if users does it themselves every action would build their app twice.
  • Add npm ci script automatically when using web framework.
  • Automatically adds a working directory config set to the hosting.source directory when hosting.source is not '.'. This is needed because "hosting" is the default directory on firebase init hosting, so if the user follows all the default options, at the end the deployment would fail as npm ci would run outside the project directory.
  • Add FIREBASE_CLI_EXPERIMENTS: "webframeworks" when using web frameworks.

Fixes #6863, #6532 and the issues described above.

Scenarios Tested

Sample Commands

leoortizz avatar Mar 15 '24 21:03 leoortizz

Codecov Report

Attention: Patch coverage is 0% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 54.53%. Comparing base (cecf08b) to head (af4d74d).

Files Patch % Lines
src/init/features/hosting/github.ts 0.00% 24 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6883      +/-   ##
==========================================
- Coverage   54.56%   54.53%   -0.03%     
==========================================
  Files         355      355              
  Lines       24723    24740      +17     
  Branches     5107     5117      +10     
==========================================
+ Hits        13490    13492       +2     
- Misses      10013    10028      +15     
  Partials     1220     1220              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 15 '24 21:03 codecov-commenter