From 40347bedc838656700a30f93ef9cefcc3205d6da Mon Sep 17 00:00:00 2001 From: Sunny Tyagi <107617248+Tyagi-Sunny@users.noreply.github.com> Date: Fri, 5 Apr 2024 19:22:29 +0530 Subject: [PATCH] fix(mixin): test case update related to pr 103 (#110) * fix(mixin): test case update related to pr 103 test case update related to pr 103 gh-0 * feat(ci-cd): add test workflow add test workflow gh-0 --- .github/workflows/main.yml | 30 +++++++++++++++++++ .../acceptance/fixtures/dummy-application.ts | 2 +- src/mixins/audit.mixin.ts | 1 - 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6be2e19 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +# This workflow contains a single job called "npm_test" +jobs: + npm_test: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: Install Monorepo Deps + run: npm ci + + - name: Run Test Cases + run: npm run test + + - name: Run Lint Checks + run: npm run lint \ No newline at end of file diff --git a/src/__tests__/acceptance/fixtures/dummy-application.ts b/src/__tests__/acceptance/fixtures/dummy-application.ts index ffd5eca..72cd0da 100644 --- a/src/__tests__/acceptance/fixtures/dummy-application.ts +++ b/src/__tests__/acceptance/fixtures/dummy-application.ts @@ -6,13 +6,13 @@ import {BootMixin} from '@loopback/boot'; import {ApplicationConfig} from '@loopback/core'; import {RepositoryMixin} from '@loopback/repository'; import {RestApplication} from '@loopback/rest'; -import {AuditLogComponent} from '@sourceloop/audit-log'; import {TenantUtilitiesBindings} from '@sourceloop/core'; import * as path from 'path'; import {TestRepository} from './repositories/test.repository'; import {AuditLogRepository} from '../../../repositories'; import {TestAuditLogErrorRepository} from './repositories/audit-error.repository'; import {TestErrorRepository} from './repositories/test-error.repository'; +import {AuditLogComponent} from '../../../component'; export {ApplicationConfig}; diff --git a/src/mixins/audit.mixin.ts b/src/mixins/audit.mixin.ts index ed9b900..ca607dc 100644 --- a/src/mixins/audit.mixin.ts +++ b/src/mixins/audit.mixin.ts @@ -19,7 +19,6 @@ import { User, } from '../types'; - // NOSONAR - ignore camelCase naming convention export function AuditRepositoryMixin< M extends Entity,