Skip to content

Commit

Permalink
Merge pull request #8 from commercetools/leungkinghin/incremental-upd…
Browse files Browse the repository at this point in the history
…ater-test-cases

Add sample test cases to incremental updater
  • Loading branch information
leungkinghin-ct authored Sep 13, 2023
2 parents f28c6d4 + 851370a commit 1a36e87
Show file tree
Hide file tree
Showing 8 changed files with 530 additions and 153 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,34 @@ jobs:
build-incremental-updater:
name: Build the application for incremental-updater
runs-on: ubuntu-latest
env:
CTP_CLIENT_ID: ${{ secrets.CTP_CLIENT_ID }}
CTP_CLIENT_SECRET: ${{ secrets.CTP_CLIENT_SECRET }}
CTP_PROJECT_KEY: ${{ secrets.CTP_PROJECT_KEY }}
CTP_SCOPE: ${{ secrets.CTP_SCOPE }}
CTP_REGION: ${{ secrets.CTP_REGION }}
CTP_STORE_KEY: ${{ secrets.CTP_STORE_KEY }}
SEARCH_PLATFORM_CONFIG: ${{ secrets.SEARCH_PLATFORM_CONFIG }}
defaults:
run:
working-directory: incremental-updater
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16.x'
- run: npm ci
- run: npm run lint && npm run prettier

- name: Install modules
run: npm ci

- name: Check the coding style
run: npm run lint && npm run prettier

- name: Execute integration test
run: npm run test

build-full-ingestion:
name: Build the application for full-ingestion
Expand Down
3 changes: 3 additions & 0 deletions incremental-updater/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
};
8 changes: 8 additions & 0 deletions incremental-updater/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
displayName: 'Tests Javascript Application - Service',
moduleDirectories: ['node_modules', 'src'],
testMatch: ['**/tests/**/*.js?(x)', '**/?(*.)+(spec|test).js?(x)'],
testEnvironment: 'node',
verbose: true,
silent: true,
};
Loading

0 comments on commit 1a36e87

Please sign in to comment.