Update filesize badges (might need further evolution before 2.0.0) (#1787)
* Update filesize badges (might need further evolution before 2.0.0) * Don't run full CI/CD when only .md docs have changed in the PR - move eslint checks into their own file so they can also ignore .md changes - prettier checks don't need the same perms as eslint, so we can demote pull_request_target -> pull_request * Add empty changeset * Implement the bundle size change originally originally added in #1784 - adding here also to show how the conflicts would resolve * Update .github/workflows/eslint-check.yml --------- Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
This commit is contained in:
2
.changeset/empty-devonly-template.md
Normal file
2
.changeset/empty-devonly-template.md
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
---
|
||||
18
.github/workflows/ci-cd.yml
vendored
18
.github/workflows/ci-cd.yml
vendored
@@ -1,6 +1,12 @@
|
||||
name: Tests
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
@@ -41,16 +47,6 @@ jobs:
|
||||
# run: PUPPETEER_EXECUTABLE_PATH=${{ steps.setup-chrome.outputs.chrome-path }} PUPPETEER_HEADLESS=true xvfb-run --server-args="-screen 0 1920x1080x24" yarn test
|
||||
run: PUPPETEER_HEADLESS=true xvfb-run --server-args="-screen 0 1920x1080x24" yarn test
|
||||
|
||||
- name: Check bundle sizes
|
||||
uses: preactjs/compressed-size-action@v2
|
||||
with:
|
||||
install-script: 'yarn install --frozen-lockfile'
|
||||
build-script: 'build:all'
|
||||
compression: 'none'
|
||||
pattern: '**/dist/*.{js,cjs,mjs,css}'
|
||||
env:
|
||||
PUPPETEER_SKIP_DOWNLOAD: true
|
||||
|
||||
- name: Upload diff images to GitHub
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
|
||||
86
.github/workflows/eslint-check.yml
vendored
Normal file
86
.github/workflows/eslint-check.yml
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
name: ESLint Check
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request_target:
|
||||
|
||||
jobs:
|
||||
eslint_check_upload:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
name: ESLint Check and Report Upload
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.head_ref }}
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: 'yarn'
|
||||
- name: Install Dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
env:
|
||||
PUPPETEER_SKIP_DOWNLOAD: true
|
||||
- name: Build Packages
|
||||
run: NODE_OPTIONS='--max-old-space-size=4096' yarn build:all
|
||||
- name: Eslint Check
|
||||
run: yarn turbo run lint
|
||||
- name: Save Code Linting Report JSON
|
||||
run: yarn lint:report
|
||||
# Continue to the next step even if this fails
|
||||
continue-on-error: true
|
||||
- name: Upload ESLint Report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: eslint_report.json
|
||||
path: eslint_report.json
|
||||
|
||||
annotation:
|
||||
# Skip the annotation action in push events
|
||||
if: github.event_name == 'pull_request_target'
|
||||
permissions:
|
||||
checks: write
|
||||
needs: eslint_check_upload
|
||||
runs-on: ubuntu-latest
|
||||
name: ESLint Annotation
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: eslint_report.json
|
||||
- name: Annotate Code Linting Results
|
||||
uses: ataylorme/eslint-annotate-action@v2
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
report-json: 'eslint_report.json'
|
||||
|
||||
bundle_size:
|
||||
# Only runs on PRs (needs a base branch to compare against)
|
||||
if: github.event_name == 'pull_request_target'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
name: Check Bundle Sizes
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.head_ref }}
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: 'yarn'
|
||||
- name: Check bundle sizes
|
||||
uses: preactjs/compressed-size-action@v2
|
||||
with:
|
||||
install-script: 'yarn install --frozen-lockfile'
|
||||
build-script: 'build:all'
|
||||
compression: 'none'
|
||||
pattern: '**/dist/*.{js,cjs,mjs,css}'
|
||||
env:
|
||||
PUPPETEER_SKIP_DOWNLOAD: true
|
||||
56
.github/workflows/style-check.yml
vendored
56
.github/workflows/style-check.yml
vendored
@@ -1,60 +1,8 @@
|
||||
name: Code Style Check
|
||||
name: Prettier Check
|
||||
|
||||
on: [push, pull_request_target]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
eslint_check_upload:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
name: ESLint Check and Report Upload
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.head_ref }}
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: 'yarn'
|
||||
- name: Install Dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
env:
|
||||
PUPPETEER_SKIP_DOWNLOAD: true
|
||||
- name: Build Packages
|
||||
run: NODE_OPTIONS='--max-old-space-size=4096' yarn build:all
|
||||
- name: Eslint Check
|
||||
run: yarn turbo run lint
|
||||
- name: Save Code Linting Report JSON
|
||||
run: yarn lint:report
|
||||
# Continue to the next step even if this fails
|
||||
continue-on-error: true
|
||||
- name: Upload ESLint Report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: eslint_report.json
|
||||
path: eslint_report.json
|
||||
|
||||
annotation:
|
||||
# Skip the annotation action in push events
|
||||
if: github.event_name == 'pull_request_target'
|
||||
permissions:
|
||||
checks: write
|
||||
needs: eslint_check_upload
|
||||
runs-on: ubuntu-latest
|
||||
name: ESLint Annotation
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: eslint_report.json
|
||||
- name: Annotate Code Linting Results
|
||||
uses: ataylorme/eslint-annotate-action@v2
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
report-json: 'eslint_report.json'
|
||||
|
||||
prettier_check:
|
||||
# In the forked PR, it's hard to format code and push to the branch directly, so the action only check the format correctness.
|
||||
if: github.event_name != 'push' && github.event.pull_request.head.repo.full_name != 'rrweb-io/rrweb'
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
[](https://join.slack.com/t/rrweb/shared_invite/zt-siwoc6hx-uWay3s2wyG8t5GpZVb8rWg)
|
||||
[](https://twitter.com/rrweb_io)
|
||||
[](https://www.reddit.com/r/rrweb)
|
||||

|
||||

|
||||

|
||||

|
||||
[](https://www.jsdelivr.com/package/npm/rrweb)
|
||||
|
||||
[中文文档](./README.zh_CN.md)
|
||||
|
||||
Reference in New Issue
Block a user