Skip to content

ci:add bundle-size-check #339

ci:add bundle-size-check

ci:add bundle-size-check #339

# Simple automation of tests on pushes to master branch
name: tests
on:
push:
branches:
- 'master'
# - 'next'
pull_request:
branches:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# single job for testing, linting and spellcheck
testing:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test -- -- --coverage --coverage.provider=v8
- name: Run linter
run: yarn lint
- name: Run spellchecker
run: yarn spellcheck
- name: Check bundle size
run: yarn workspace cashscript size
- name: Upload bundle size treemap
uses: actions/upload-artifact@v4
if: always()
with:
name: bundle-size-treemap
path: packages/cashscript/bundle-size/stats.html
if-no-files-found: ignore
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: CashScript/cashscript