Skip to content

feat #53 Build portfolio migration tool for schema/version upgrades #9

feat #53 Build portfolio migration tool for schema/version upgrades

feat #53 Build portfolio migration tool for schema/version upgrades #9

Workflow file for this run

name: Backend Tests
on:
pull_request:
paths:
- 'backend/**'
- 'docs/MIGRATION.md'
- '.github/workflows/backend-tests.yml'
push:
branches:
- main
- develop
paths:
- 'backend/**'
- 'docs/MIGRATION.md'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'backend/package-lock.json'
- name: Install dependencies
working-directory: backend
run: npm ci
- name: Verify migrations (dry-run)
working-directory: backend
run: npm run db:migrate:dry-run
- name: Run tests
working-directory: backend
run: npm run test
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results-${{ matrix.node-version }}
path: backend/coverage/
if-no-files-found: ignore