Skip to content

Executing test QA on UK-Export-Finance/mdm-api πŸš€ #1729

Executing test QA on UK-Export-Finance/mdm-api πŸš€

Executing test QA on UK-Export-Finance/mdm-api πŸš€ #1729

Workflow file for this run

# MDM-API Git Hub Actions
#####################################
# This GHA is responsible for initiating various test suites
# upon a PR creation. Following test suites are executed:
# 1. Unit tests (Jest)
# 2. API tests (Jest)
name: Quality Assurance - Tests
run-name: Executing test QA on ${{ github.repository }} πŸš€
on:
pull_request:
branches: [main]
paths:
- "**"
env:
environment: "qa"
TIMEZONE: ${{ vars.TIMEZONE }}
jobs:
# 1. Setup test infrastructure
setup:
name: Infrastructure setup πŸ”§
runs-on: ubuntu-latest
outputs:
environment: ${{ env.environment }}
timezone: ${{ env.timezone }}
steps:
- name: Environment πŸ§ͺ
run: echo "Environment set to ${{ env.environment }}"
- name: Timezone 🌐
run: echo "Timezone set to ${{ env.timezone }}"
# 2. Unit tests
unit-tests:
name: Unit πŸ‘·
needs: setup
environment:
name: ${{ needs.setup.outputs.environment }}
runs-on: ubuntu-latest
steps:
- name: Timezone
uses: szenius/[email protected]
with:
timezoneLinux: ${{ needs.setup.outputs.timezone }}
- name: Repository
uses: actions/checkout@v4
- name: Node
uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION }}
- name: Dependencies
working-directory: ./
run: npm ci --legacy-peer-deps
- name: Execute
working-directory: ./
run: npm run unit-test