Skip to content

feat: upgraded react widget to be deployed #1

feat: upgraded react widget to be deployed

feat: upgraded react widget to be deployed #1

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: "20"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Type check
run: npx tsc --noEmit
- name: Build
run: npm run build
- name: Verify output
run: |
if [ ! -f dist/app.min.js ]; then
echo "Build output missing: dist/app.min.js"
exit 1
fi
SIZE=$(stat -f%z dist/app.min.js 2>/dev/null || stat -c%s dist/app.min.js)
echo "Bundle size: ${SIZE} bytes ($(( SIZE / 1024 ))KB)"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: widget-dist
path: dist/app.min.js
retention-days: 30
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test -- --passWithNoTests