Skip to content

PRMP-1188 Create a lambda to handle MNS notifications #2452

PRMP-1188 Create a lambda to handle MNS notifications

PRMP-1188 Create a lambda to handle MNS notifications #2452

name: SonarCloud-Analysis
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Configure React environment vars
env:
ENDPOINT_DOC_STORE_API: http://localhost:3000
AWS_REGION: test region
OIDC_PROVIDER_ID: not provided yet
BUILD_ENV: development
IMAGE_VERSION: 'ndr-${{ vars.BUILD_ENV }}-app:${{ github.sha }}'
run: |
./react-environment-config.sh
working-directory: ./app
shell: bash
- run: make clean-install
- run: make test-ui-coverage
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Make virtual environment
run: |
make env
- name: Start virtual environment
run: |
source ./lambdas/venv/bin/activate
# echo PATH=$PATH >> $GITHUB_ENV
- name: Test with pytest
run: |
make test-unit-coverage
cd ./lambdas
sed -i "s@filename=\"@filename=\"lambdas/@" coverage.xml
cd ..
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}