Skip to content

chore: Setup RelativeCI for bundle comparison #1

chore: Setup RelativeCI for bundle comparison

chore: Setup RelativeCI for bundle comparison #1

Workflow file for this run

name: Bundle Size
on:
push:
branches: main
pull_request:
branches: main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
# Build and output bundle stats to webpack-stats.json
- name: Build
run: pnpm build -- --json webpack-stats.json
# Send bundle stats and build information to RelativeCI
- name: Send bundle stats to RelativeCI
uses: relative-ci/agent-action@v2
with:
webpackStatsFile: ./webpack-stats.json
key: ${{ secrets.RELATIVE_CI_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
report-coverage:
needs: test-coverage

Check failure on line 53 in .github/workflows/relative-ci.yml

View workflow run for this annotation

GitHub Actions / Bundle Size

Invalid workflow file

The workflow is not valid. .github/workflows/relative-ci.yml (Line: 53, Col: 12): Job 'report-coverage' depends on unknown job 'test-coverage'.
name: Report Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download coverage (${{ github.head_ref }})
uses: actions/download-artifact@v4
with:
name: coverage-${{ github.head_ref }}
path: coverage
- name: Download coverage (main)
uses: actions/download-artifact@v4
with:
name: coverage-main
path: coverage-main
- name: Report coverage
if: always()
uses: davelosert/[email protected]
with:
json-summary-compare-path: coverage-main/coverage-summary.json