Skip to content

Commit

Permalink
Merge pull request #199 from IMDA-BTG/test-for-release-v0.9.4
Browse files Browse the repository at this point in the history
Test & Merge for Release v0.9.4

The requested reviews are Approved and the Integration Test Passed. Proceeded to merge PR to Release Branch v0.9.x. Ready to cut for Release v0.9.4.
  • Loading branch information
imda-benedictlee authored Oct 11, 2023
2 parents e2f3959 + cfa8423 commit 72c480c
Show file tree
Hide file tree
Showing 53 changed files with 5,594 additions and 3,691 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/pre-merge-checks-portal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ name: Pre-Merge Checks (ai-verify-portal)
on:
# Runs when a pull request to main is being assigned
pull_request:
types: [ assigned, synchronize ]
types: [assigned, synchronize]
branches:
- 'main'
- "main"
paths:
- 'ai-verify-portal/**'
- "ai-verify-portal/**"

# Run this workflow manually from Actions tab
workflow_dispatch:
Expand All @@ -25,7 +25,6 @@ concurrency:
cancel-in-progress: true

jobs:

pre-merge-checks:
# Run only when PR is assigned, even on subsequent commits (i.e. synchronize)
if: (github.event_name == 'pull_request' && github.event.pull_request.assignee != null) || github.event_name == 'workflow_dispatch'
Expand All @@ -34,7 +33,6 @@ jobs:
timeout-minutes: 40

steps:

# Checkout code
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -48,7 +46,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache: "npm"
cache-dependency-path: ai-verify-portal

- name: Install dependencies for shared-library
Expand All @@ -65,8 +63,8 @@ jobs:
npm install --omit=dev
npx license-checker --summary --out licenses-found.txt -y
npm install -D
npm i -D jest jest-html-reporter jest-json-reporter ts-jest @jest/globals badge-maker
npm i -D eslint eslint-formatter-html @typescript-eslint/eslint-plugin @typescript-eslint/parser
npm i -D badge-maker
npm i -D eslint-formatter-html
npm link ../ai-verify-shared-library
# Compile typescript source files
Expand Down Expand Up @@ -107,10 +105,10 @@ jobs:
working-directory: ${{ github.workspace }}/ai-verify-portal
run: |
set +e
npx eslint .
npm run lint
exit_code_lint=$?
npx eslint -f html -o eslint-report.html .
npx eslint -f json -o eslint-report.json .
npm run lint-html-report
npm run lint-json-report
node ci/createBadges.mjs lint
set -e
if [ $exit_code_lint -ne 0 ]; then
Expand All @@ -124,9 +122,9 @@ jobs:
working-directory: ${{ github.workspace }}/ai-verify-portal
run: |
set +e
npm audit
npm audit --omit=dev
exit_code_audit=$?
npm audit --json | npx npm-audit-markdown --output npm-audit-report.md
npm audit --omit=dev --json | npx npm-audit-markdown --output npm-audit-report.md
npx markdown-to-html-cli --source npm-audit-report.md --output npm-audit-report.html -y
echo -e "License Check Summary for portal\n" > license-report.txt
cat licenses-found.txt >> license-report.txt
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# README.md
[![Integration Tests](https://github.com/IMDA-BTG/aiverify/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/IMDA-BTG/aiverify/actions/workflows/integration-tests.yml)

## Introduction

Expand Down
21 changes: 21 additions & 0 deletions ai-verify-portal/__mocks__/ai-verify-shared-library/lib.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
import { createContext } from 'react';

export function getComponents() {
return {};
}

export function parseRJSFSchema() {
return {
sensitive_feature: {
items: {},
},
};
}

export type InputDataContextType = {
meta: any;
data: any;
onChangeData?: (key: string, value: any) => void;
};

export const InputDataContext = createContext<InputDataContextType>({
meta: {},
data: {},
});
Loading

0 comments on commit 72c480c

Please sign in to comment.