Skip to content

chore: update vitest monorepo to v2 (major) #648

chore: update vitest monorepo to v2 (major)

chore: update vitest monorepo to v2 (major) #648

Workflow file for this run

name: Report
on: pull_request
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm ci --ignore-scripts
- run: npm run bundle:library
- run: |
SIZE_REPORT_LIBRARY_BRANCH=$(npm run report:size:library | tail -n 7)
echo "SIZE_REPORT_LIBRARY_BRANCH<<EOF" >> $GITHUB_ENV
echo "$SIZE_REPORT_LIBRARY_BRANCH" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- run: |
# include hidden files
# https://askubuntu.com/questions/740805/how-can-i-remove-all-files-from-current-directory-using-terminal
shopt -s dotglob
rm -rf *
- uses: actions/checkout@v4
with:
ref: 'main'
- run: npm ci --ignore-scripts
- run: npm run bundle:library
- run: |
SIZE_REPORT_LIBRARY_MAIN=$(npm run report:size:library | tail -n 7)
echo "SIZE_REPORT_LIBRARY_MAIN<<EOF" >> $GITHUB_ENV
echo "$SIZE_REPORT_LIBRARY_MAIN" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- uses: actions/github-script@v7
with:
script: |
const { SIZE_REPORT_LIBRARY_BRANCH, SIZE_REPORT_LIBRARY_MAIN, SIZE_REPORT_SHOWCASE_BRANCH, SIZE_REPORT_SHOWCASE_MAIN } = process.env
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `# 📈 Size Report\n\n## 📦 Library size\n\n### 📍 Current branch\n\n${SIZE_REPORT_LIBRARY_BRANCH}\n\n### 🏠 Main branch\n\n${SIZE_REPORT_LIBRARY_MAIN}`
})