fix: gh actions for vite build (#10212)
Fixes https://linear.app/chatwoot/issue/CW-3604/fix-gh-actions-for-vite-build - [x] response bot spec - [x] chatwoot ce spec - [x] size limit check
This commit is contained in:
10
.github/workflows/run_response_bot_spec.yml
vendored
10
.github/workflows/run_response_bot_spec.yml
vendored
@@ -49,13 +49,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
with:
|
||||||
|
version: 9.3.0
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: yarn
|
cache: pnpm
|
||||||
|
|
||||||
- name: yarn
|
- name: pnpm
|
||||||
run: yarn install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Create database
|
- name: Create database
|
||||||
run: bundle exec rake db:create
|
run: bundle exec rake db:create
|
||||||
|
|||||||
20
.github/workflows/size-limit.yml
vendored
20
.github/workflows/size-limit.yml
vendored
@@ -19,23 +19,33 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
with:
|
||||||
|
version: 9.3.0
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'yarn'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: yarn
|
- name: pnpm
|
||||||
run: yarn install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Strip enterprise code
|
- name: Strip enterprise code
|
||||||
run: |
|
run: |
|
||||||
rm -rf enterprise
|
rm -rf enterprise
|
||||||
rm -rf spec/enterprise
|
rm -rf spec/enterprise
|
||||||
|
|
||||||
|
- name: setup env
|
||||||
|
run: |
|
||||||
|
cp .env.example .env
|
||||||
|
|
||||||
- name: Run asset compile
|
- name: Run asset compile
|
||||||
run: bundle exec rake assets:precompile
|
run: bundle exec rake assets:precompile
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: --openssl-legacy-provider
|
RAILS_ENV: production
|
||||||
|
|
||||||
- name: Size Check
|
- name: Size Check
|
||||||
run: yarn run size
|
run: pnpm run size
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"size-limit": [
|
"size-limit": [
|
||||||
{
|
{
|
||||||
"path": "public/packs/js/widget-*.js",
|
"path": "public/vite/assets/widget-*.js",
|
||||||
"limit": "300 KB"
|
"limit": "300 KB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user