feat(versioning): added api deployment versioning, change detection in workflow, added ci job to run migrations on merge to main (#220)

* added initial code for versioning

* ran migrations & improvements to versioning

* change sensitivity of state diff checker

* debounce the change detection function

* cleaned up file structure

* added ci job to run migrations when merging to main

* ran migrations

* cleanup unused files, remove unused dependencies
This commit is contained in:
Waleed Latif
2025-04-02 22:21:07 -07:00
committed by GitHub
parent c7ad9d5dd8
commit 9d3b27065a
17 changed files with 2348 additions and 2464 deletions

View File

@@ -26,6 +26,12 @@ jobs:
working-directory: ./sim
run: npm ci
- name: Fix Rollup module issue
working-directory: ./sim
run: |
rm -rf node_modules package-lock.json
npm install
- name: Run tests with coverage
working-directory: ./sim
env:
@@ -41,4 +47,30 @@ jobs:
with:
directory: ./sim/coverage
fail_ci_if_error: false
verbose: true
verbose: true
migrations:
name: Apply Database Migrations
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: './sim/package-lock.json'
- name: Install dependencies
working-directory: ./sim
run: npm ci
- name: Apply migrations
working-directory: ./sim
env:
POSTGRES_URL: ${{ secrets.DATABASE_URL }}
run: npx drizzle-kit push