ci and a random lint

This commit is contained in:
dal 2025-07-21 00:28:39 -06:00
parent 6d148947c9
commit ec4262b87c
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
2 changed files with 78 additions and 1 deletions

74
.github/workflows/ci.yml vendored Normal file
View File

@ -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

View File

@ -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')