Skip to content

Commit

Permalink
Merge pull request #4 from commercetools/leungkinghin/full-ingestion-…
Browse files Browse the repository at this point in the history
…test-case

Add test cases template
  • Loading branch information
leungkinghin-ct authored Aug 16, 2023
2 parents 89d6a25 + f438da3 commit 267ea79
Show file tree
Hide file tree
Showing 6 changed files with 524 additions and 216 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,30 @@ jobs:
build-full-ingestion:
name: Build the application for full-ingestion
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 }}
SEARCH_PLATFORM_CONFIG: ${{ secrets.SEARCH_PLATFORM_CONFIG }}
defaults:
run:
working-directory: full-ingestion
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
3 changes: 3 additions & 0 deletions full-ingestion/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 full-ingestion/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 267ea79

Please sign in to comment.