From 30ae22a6452ecb430ea00f29b2078386cb4b59af Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Fri, 19 Dec 2025 19:18:15 +0900 Subject: [PATCH] feat(ci): add GitHub Actions CI workflow with test, typecheck, and build jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add CI that runs tests, typecheck, and build verification on push/PR to master. Include test script in package.json and new .github/workflows/ci.yml. Adds: - .github/workflows/ci.yml: CI workflow with test, typecheck, and build jobs - package.json: test script entry 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) --- .github/workflows/ci.yml | 69 ++++++++++++++++++++++++++++++++++++++++ package.json | 3 +- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1a189d5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,69 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + env: + BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi" + + - name: Run tests + run: bun test + + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + env: + BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi" + + - name: Type check + run: bun run typecheck + + build: + runs-on: ubuntu-latest + needs: [test, typecheck] + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + env: + BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi" + + - name: Build + run: bun run build + + - name: Verify build output + run: | + test -f dist/index.js || (echo "ERROR: dist/index.js not found!" && exit 1) + test -f dist/index.d.ts || (echo "ERROR: dist/index.d.ts not found!" && exit 1) diff --git a/package.json b/package.json index f211182..5571e20 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "build:schema": "bun run script/build-schema.ts", "clean": "rm -rf dist", "prepublishOnly": "bun run clean && bun run build", - "typecheck": "tsc --noEmit" + "typecheck": "tsc --noEmit", + "test": "bun test" }, "keywords": [ "opencode",