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:
Vishnu Narayanan
2024-10-03 16:25:48 +05:30
committed by GitHub
parent f14edd5242
commit fdc3e370ef
3 changed files with 23 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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"
}, },
{ {