From 1b780656c1384d2d1d8ffb15533df9b33299f874 Mon Sep 17 00:00:00 2001 From: Kieran Klukas Date: Wed, 3 Jun 2026 20:28:39 -0400 Subject: [PATCH] feat: add ci --- .github/workflows/ci.yaml | 35 +++++++++++++++++++++++++++++++++++ .github/workflows/deploy.yaml | 4 ++++ package.json | 7 ++++++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..503cd08 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + check: + 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 --frozen-lockfile + + - name: Format check + run: bunx @biomejs/biome format --error-on-warnings . + + - name: Lint + run: bunx @biomejs/biome lint --error-on-warnings . + + - name: Test + run: bun test + env: + SLACK_SIGNING_SECRET: ci-test-secret + SLACK_BOT_TOKEN: xoxb-ci-test-token + + - name: Build + run: bun run build diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 07458df..22419d0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -9,7 +9,11 @@ permissions: deployments: write jobs: + ci: + uses: ./.github/workflows/ci.yaml + deploy: + needs: ci uses: taciturnaxolotl/dots/.github/workflows/deploy-service.yml@main with: service: cachet diff --git a/package.json b/package.json index d66b83b..210830e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,12 @@ "dev": "bun run --watch src/index.ts", "start": "bun run src/index.ts", "build": "bun build --compile --outfile dist/cachet --production ./src/index.ts", - "test:watch": "bun test --watch" + "test:watch": "bun test --watch", + "format": "biome format --write .", + "format:check": "biome format --error-on-warnings .", + "lint": "biome lint --error-on-warnings .", + "lint:fix": "biome lint --write .", + "check": "biome check --write ." }, "dependencies": { "@tqman/nice-logger": "^1.1.1", -- 2.51.2