Skip to content

Fix math round after conversion to cents #4690

Fix math round after conversion to cents

Fix math round after conversion to cents #4690

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: 'Test Service: Code'
on:
workflow_dispatch:
pull_request:
paths:
- '.github/actions/build-service/action.yml'
- '.github/workflows/test_service_code.yml'
- 'services/121-service/**'
push:
paths:
- '.github/actions/build-service/action.yml'
- '.github/workflows/test_service_code.yml'
- 'services/121-service/**'
branches:
- 'release/*'
- 'hotfix/*'
env:
workingDirectory: 'services/121-service/'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v4
with:
# See supported Node.js versions: https://github.com/Azure/app-service-linux-docs/blob/master/Runtime_Support/node_support.md
node-version-file: '${{ env.workingDirectory }}/.node-version'
cache: 'npm'
cache-dependency-path: '${{ env.workingDirectory }}/package-lock.json'
- name: Install
working-directory: ${{ env.workingDirectory }}
run: 'npm ci --omit=optional --no-fund --no-audit'
- name: Lint
working-directory: ${{ env.workingDirectory }}
run: 'npm run lint'
- name: Check for dead code
working-directory: ${{ env.workingDirectory }}
run: 'npm run knip'
- name: Check for TS errors
working-directory: ${{ env.workingDirectory }}
run: 'npm run typecheck'
- name: Unit-Test
working-directory: ${{ env.workingDirectory }}
env:
NODE_ENV: development
TWILIO_SID: AC
TWILIO_AUTHTOKEN: test
TWILIO_WHATSAPP_NUMBER: 15005550006
MOCK_TWILIO: TRUE
MOCK_INTERSOLVE: TRUE
MOCK_COMMERCIAL_BANK_ETHIOPIA: TRUE
run: 'npm run test:unit:all'