Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
37 changes: 37 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"ignorePatterns": [
"node_modules/**",
"*.config.mts",
"prisma/**",
"legacy**",
"generated/**"
],
"rules": {
"@typescript-eslint/no-unused-expressions": [
"error",
{ "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true }
]
},
"overrides": [
{
"files": ["tests/**/*.ts", "tests/**/*.js"],
"rules": {
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-unused-expressions": "off"
}
}
]
}

31 changes: 31 additions & 0 deletions .github/workflows/52-deploy-staging-azure_operations-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy Node.js app to Azure Web App - operations-api

on:
push:
branches:
- develop
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@v4

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_16535DB0A5374AF2A5FFD0F538170C65 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_1ADF5126AE0E4076B47D70132DF2D709 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_D03F78C8B0E048FAA31639496352BBFC }}

- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v3
with:
app-name: 'operations-api'
slot-name: 'Production'
package: .
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
cache: 'npm'

- name: Clear npm cache
Expand All @@ -35,12 +35,6 @@ jobs:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DIRECT_URL: ${{ secrets.DIRECT_URL }}

- name: Prisma migrate
run: npx prisma migrate deploy
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DIRECT_URL: ${{ secrets.DATABASE_URL }}

- name: Verify Prisma client
run: ls -la node_modules/.prisma/client

Expand All @@ -60,12 +54,10 @@ jobs:
- name: Run tests
run: npm run test
env:
# DATABASE_URL: ${{ secrets.DATABASE_URL }}
# DIRECT_URL: ${{ secrets.DATABASE_URL }}
NODE_ENV: test
DATABASE_URL: postgresql://postgres:test_password@localhost:5433/test_db
DIRECT_URL: postgresql://postgres:test_password@localhost:5433/test_db

- name: Stop test database
if: always()
run: docker compose down -v
run: docker compose down -v
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ logs/

# Coverage files
coverage/

dist/
Loading