Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: CI

on:
pull_request:
paths:
- 'listener/src/migrations/**'
- 'listener/src/database/**'
- 'listener/src/scripts/**'
- 'listener/package.json'
push:
branches:
- main
- staging

jobs:
frontend:
Expand Down Expand Up @@ -61,6 +70,29 @@ jobs:
working-directory: listener
run: npm test --silent

check-migrations:
name: Check Pending Migrations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: listener/package-lock.json
- name: Install dependencies
working-directory: listener
run: npm ci
- name: Create test database and apply all migrations
working-directory: listener
run: |
mkdir -p ./data
npm run migrate
- name: Check for pending migrations
working-directory: listener
run: npm run check-migrations

rust:
name: Rust (fmt check, tests, fuzz)
runs-on: ubuntu-latest
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,24 @@ on:
branches:
- staging
jobs:
check-migrations:
name: Check Pending Migrations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: |
cd listener
npm ci
mkdir -p ./data
npm run migrate
npm run check-migrations

deploy:
runs-on: ubuntu-latest
needs: check-migrations
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
Loading
Loading