Skip to content

Interoperate with ozone and add deployment files #4

Interoperate with ozone and add deployment files

Interoperate with ozone and add deployment files #4

Workflow file for this run

name: CI - Validate Changes
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run type checking
run: npm run type-check
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image for testing
uses: docker/build-push-action@v5
with:
context: .
target: prodrunner
load: true
tags: safe-skies-api:test
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Create test docker-compose override
run: |
cat > docker-compose.test.yml << EOF
services:
backend:
image: safe-skies-api:test
EOF
- name: Start test environment with built image
run: docker compose -f docker-compose.yml -f docker-compose.test.yml up -d
- name: Run tests using Docker image
run: docker compose -f docker-compose.yml -f docker-compose.test.yml exec backend npm run test
- name: Stop test environment
run: docker compose -f docker-compose.yml -f docker-compose.test.yml down
if: always()
- name: Clean up test files
run: rm -f docker-compose.test.yml
if: always()