From 4308c63bcdeb17c1f4d5c9f1f059ca2b4306b5a2 Mon Sep 17 00:00:00 2001 From: Altin Thaci Date: Tue, 26 Mar 2024 00:07:33 +0100 Subject: [PATCH] Add CI: typecheck, lint & format --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 33 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..08761ab --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: [push, pull_request] + +jobs: + ci: + runs-on: ubuntu-20.04 + strategy: + matrix: + bun-version: [latest] + timeout-minutes: 20 + steps: + - name: Checkout source code + uses: actions/checkout@v3 + + - name: Setup bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: ${{ matrix.bun-version }} + + - name: Install dependencies + run: bun install + + - name: Typecheck + run: bun run typecheck + + - name: Lint + run: bun run lint + + - name: Format check + run: bun run format:check diff --git a/package.json b/package.json index c9fd9ad..e20fd99 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "lint": "eslint app/", "lint:fix": "eslint app --fix", "format:check": "prettier --check app/", - "format:fix": "prettier --write app/" + "format:fix": "prettier --write app/", + "typecheck": "tsc --noEmit" }, "dependencies": { "@elysiajs/cors": "^1.0.2",