Skip to content

chore: add logging

chore: add logging #7

name: "Package Size Test"
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20" # Set Node.js version to 20
# Clean the npm cache to ensure a fresh install of dependencies
- name: Clean npm cache
run: npm cache clean --force
# Install dependencies using npm ci for a clean installation
- name: Install dependencies
run: npm ci
# Debugging step to list files in the build directory to ensure the path is correct
- name: List files in build directory
run: ls -R build/static/js/
- name: Run Package Size Badge Action
uses: ./
with:
path: "build/static/js/*.js" # Path to the JS files to check size
preset: "app" # Define preset: 'app', 'big-lib', or 'small-lib'
label: "Bundle Size"
limit: "500" # Set size limit in KB
color: "green" # Badge color
env:
ACTIONS_RUNNER_DEBUG: true
timeout-minutes: 10