Skip to content

Executing lint QA on UK-Export-Finance/mdm-api πŸš€ #204

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

Executing lint QA on UK-Export-Finance/mdm-api πŸš€ #204

Workflow file for this run

# MDM-API Git Hub Actions
#####################################
# This GHA is responsible for initiating linting checks
name: Quality Assurance - Lint
run-name: Executing lint QA on ${{ github.repository }} πŸš€
on:
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'test/**'
env:
environment: 'qa'
timezone: 'Europe/London'
node: ${{ vars.NODE_VERSION }}
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. Lint
lint:
name: Scanning 🎨
environment:
name: ${{ needs.setup.outputs.environment }}
runs-on: ubuntu-latest
steps:
- name: Timezone
uses: szenius/set-timezone@v1.2
with:
timezoneLinux: ${{ needs.setup.outputs.timezone }}
- name: Repository
uses: actions/checkout@v3
- name: Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.node }}
- name: Dependencies
working-directory: ./
run: npm ci --legacy-peer-deps
- name: Linting
working-directory: ./
run: npm run lint