refactor(tests): remove remaining explicit any from test files #322
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Database Migrations | |
| on: | |
| push: | |
| branches: [main, dev] | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: 'Preview migrations without applying (dry run)' | |
| required: false | |
| default: 'false' | |
| type: choice | |
| options: | |
| - 'true' | |
| - 'false' | |
| jobs: | |
| migrate: | |
| name: Apply DB Migrations | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: trustlink | |
| POSTGRES_PASSWORD: trustlink | |
| POSTGRES_DB: trustlink_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| DATABASE_URL: postgresql://trustlink:trustlink@localhost:5432/trustlink_db | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate Prisma client | |
| run: npx prisma generate | |
| - name: Check pending migrations (dry run) | |
| if: ${{ github.event.inputs.dry_run == 'true' }} | |
| run: | | |
| echo "=== DRY RUN: Listing pending migrations ===" | |
| npx prisma migrate status | |
| echo "=== No changes applied (dry run mode) ===" | |
| - name: Apply migrations | |
| if: ${{ github.event.inputs.dry_run != 'true' }} | |
| run: npx prisma migrate deploy | |
| - name: Verify migration status | |
| run: npx prisma migrate status |