Executing lint QA on UK-Export-Finance/mdm-api π #275
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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@v2.0 | |
with: | |
timezoneLinux: ${{ needs.setup.outputs.timezone }} | |
- name: Repository | |
uses: actions/checkout@v4 | |
- name: Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.node }} | |
- name: Dependencies | |
working-directory: ./ | |
run: npm ci --legacy-peer-deps | |
- name: Linting | |
working-directory: ./ | |
run: npm run lint |