mirror of
https://github.com/lockin-bot/react-telegram.git
synced 2026-01-13 07:09:56 +08:00
- Add CI workflow for testing, type checking, and building - Add publish workflow for npm releases - Add automated release workflow with changesets - Add PR checks for changesets and formatting - Add security scanning workflow - Add documentation validation workflow - Configure changesets for version management - Add Prettier for code formatting - Add unit tests for core and adapter packages - Add contributing guidelines and release documentation - Configure Dependabot for dependency updates - Update README with CI badges This establishes a complete CI/CD pipeline for automated testing, versioning, and publishing of the React Telegram packages. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
82 lines
1.9 KiB
YAML
82 lines
1.9 KiB
YAML
name: PR Checks
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
changeset:
|
|
name: Check Changeset
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Check for changeset
|
|
run: |
|
|
if [ "${{ github.actor }}" = "dependabot[bot]" ]; then
|
|
echo "Skipping changeset check for dependabot"
|
|
exit 0
|
|
fi
|
|
|
|
npx changeset status --since=origin/main
|
|
|
|
size-check:
|
|
name: Bundle Size Check
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Build packages
|
|
run: |
|
|
bun run build:core
|
|
bun run build:adapter
|
|
|
|
- name: Check bundle sizes
|
|
run: |
|
|
echo "Core package size:"
|
|
du -sh packages/core/dist/
|
|
echo ""
|
|
echo "Adapter package size:"
|
|
du -sh packages/mtcute-adapter/dist/
|
|
|
|
format-check:
|
|
name: Format Check
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
npx prettier --check "packages/*/src/**/*.{ts,tsx}" |