From ec4262b87c5bc182f8268218ca1167ed886af962 Mon Sep 17 00:00:00 2001 From: dal Date: Mon, 21 Jul 2025 00:28:39 -0600 Subject: [PATCH] ci and a random lint --- .github/workflows/ci.yml | 74 +++++++++++++++++++++++++++++++++ packages/database/src/schema.ts | 5 ++- 2 files changed, 78 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 000000000..f417081c0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,74 @@ +name: CI + +on: + pull_request: + +env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} + TURBO_REMOTE_ONLY: true + +jobs: + ci: + name: Build, Lint & Test + runs-on: blacksmith-4vcpu-ubuntu-2404 + timeout-minutes: 30 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Setup Node.js + uses: useblacksmith/setup-node@v5 + with: + node-version: 22 + cache: 'pnpm' + + - name: Mount node_modules sticky disk + uses: useblacksmith/stickydisk@v1 + with: + key: ${{ github.repository }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }} + path: ./node_modules + + - name: Mount pnpm store sticky disk + uses: useblacksmith/stickydisk@v1 + with: + key: ${{ github.repository }}-pnpm-store + path: ~/.local/share/pnpm/store + + - name: Mount Turbo cache sticky disk + uses: useblacksmith/stickydisk@v1 + with: + key: ${{ github.repository }}-turbo-cache + path: ./.turbo + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build all packages + run: pnpm build + env: + NODE_ENV: production + + - name: Lint all packages + run: pnpm lint + + - name: Run all unit tests + run: pnpm test:unit + + - name: Upload test coverage + uses: actions/upload-artifact@v4 + if: always() + with: + name: coverage + path: | + **/coverage/** + !**/coverage/tmp/** + retention-days: 7 \ No newline at end of file diff --git a/packages/database/src/schema.ts b/packages/database/src/schema.ts index 67af583ec..1635b4d18 100644 --- a/packages/database/src/schema.ts +++ b/packages/database/src/schema.ts @@ -1992,7 +1992,10 @@ export const githubIntegrations = pgTable( foreignColumns: [users.id], name: 'github_integrations_user_id_fkey', }).onDelete('set null'), - unique('github_integrations_org_installation_key').on(table.organizationId, table.installationId), + unique('github_integrations_org_installation_key').on( + table.organizationId, + table.installationId + ), index('idx_github_integrations_org_id').using( 'btree', table.organizationId.asc().nullsLast().op('uuid_ops')