mirror of
https://github.com/yamadashy/repomix.git
synced 2026-05-30 11:18:53 +02:00
df881a7c57
- Migrate the build-and-run job in ci.yml to `node --run build -- --sourceMap --declaration` so the inline command matches the `node --run` style of the test job (claude review round 2 #1) - Update the hi github-actions.md matrix example from `[22, 24]` to `[22, 24, 26]` so the doc mirrors the project's actual CI matrix (gemini-code-assist / coderabbitai inline comment) - Bump the stale "(Node 20+)" baseline in reviewer-performance.md to "(Node 22+)" to track the new engines floor (claude review round 2 minor)
213 lines
6.7 KiB
YAML
213 lines
6.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- 'LICENSE'
|
|
- '.github/releases/**'
|
|
- 'website/**'
|
|
- 'browser/**'
|
|
pull_request:
|
|
branches: [main]
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- 'LICENSE'
|
|
- '.github/releases/**'
|
|
- 'website/**'
|
|
- 'browser/**'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint-biome:
|
|
name: Lint Biome
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version-file: .tool-versions
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: node --run lint-biome && git diff --exit-code
|
|
|
|
lint-oxlint:
|
|
name: Lint oxlint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version-file: .tool-versions
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: node --run lint-oxlint && git diff --exit-code
|
|
|
|
lint-ts:
|
|
name: Lint TypeScript
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version-file: .tool-versions
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: node --run lint-ts
|
|
|
|
lint-secretlint:
|
|
name: Lint Secretlint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version-file: .tool-versions
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: node --run lint-secretlint
|
|
|
|
test:
|
|
name: Test
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
node-version: [22.x, 24.x, 26.x]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: npm ci
|
|
- run: node --run test -- --reporter=verbose
|
|
env:
|
|
CI_OS: ${{ runner.os }}
|
|
|
|
test-bun:
|
|
name: Test with Bun
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
bun-version: [latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup Bun ${{ matrix.bun-version }}
|
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
|
with:
|
|
bun-version: ${{ matrix.bun-version }}
|
|
- run: bun install
|
|
- run: bun run test
|
|
env:
|
|
CI_OS: ${{ runner.os }}
|
|
|
|
test-coverage:
|
|
name: Test coverage
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version-file: .tool-versions
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: node --run test-coverage -- --reporter=verbose --reporter=junit --outputFile.junit=./test-report.junit.xml
|
|
env:
|
|
CI_OS: ${{ runner.os }}
|
|
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
with:
|
|
name: test-coverage
|
|
path: coverage/
|
|
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
|
|
with:
|
|
fail_ci_if_error: true
|
|
directory: ./coverage
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
- uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
|
|
if: ${{ !cancelled() }}
|
|
with:
|
|
files: ./test-report.junit.xml
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
build-and-run:
|
|
name: Build and run
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
node-version: [22.x, 24.x, 26.x]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: npm ci
|
|
- run: node --run build -- --sourceMap --declaration
|
|
- name: Remove dev dependencies
|
|
run: npm prune --omit=dev
|
|
- run: node bin/repomix.cjs
|
|
- run: node bin/repomix.cjs --version
|
|
- run: node bin/repomix.cjs --help
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
with:
|
|
name: repomix-output-${{ matrix.os }}-${{ matrix.node-version }}.txt
|
|
path: repomix-output.txt
|
|
|
|
build-and-run-bun:
|
|
name: Build and run with Bun
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
bun-version: [latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup Bun ${{ matrix.bun-version }}
|
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
|
with:
|
|
bun-version: ${{ matrix.bun-version }}
|
|
- run: bun install
|
|
- run: bun run build
|
|
- name: Install only production dependencies
|
|
run: bun install --production
|
|
- run: bun bin/repomix.cjs
|
|
- run: bun bin/repomix.cjs --version
|
|
- run: bun bin/repomix.cjs --help
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
with:
|
|
name: repomix-output-bun-${{ matrix.os }}-${{ matrix.bun-version }}.txt
|
|
path: repomix-output.txt
|