Skip to content

Commit 1a36e87

Browse files
Merge pull request #8 from commercetools/leungkinghin/incremental-updater-test-cases
Add sample test cases to incremental updater
2 parents f28c6d4 + 851370a commit 1a36e87

File tree

8 files changed

+530
-153
lines changed

8 files changed

+530
-153
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,34 @@ jobs:
66
build-incremental-updater:
77
name: Build the application for incremental-updater
88
runs-on: ubuntu-latest
9+
env:
10+
CTP_CLIENT_ID: ${{ secrets.CTP_CLIENT_ID }}
11+
CTP_CLIENT_SECRET: ${{ secrets.CTP_CLIENT_SECRET }}
12+
CTP_PROJECT_KEY: ${{ secrets.CTP_PROJECT_KEY }}
13+
CTP_SCOPE: ${{ secrets.CTP_SCOPE }}
14+
CTP_REGION: ${{ secrets.CTP_REGION }}
15+
CTP_STORE_KEY: ${{ secrets.CTP_STORE_KEY }}
16+
SEARCH_PLATFORM_CONFIG: ${{ secrets.SEARCH_PLATFORM_CONFIG }}
917
defaults:
1018
run:
1119
working-directory: incremental-updater
1220
steps:
13-
- uses: actions/checkout@v3
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
1424
- name: Use Node.js 16.x
1525
uses: actions/setup-node@v3
1626
with:
1727
node-version: '16.x'
18-
- run: npm ci
19-
- run: npm run lint && npm run prettier
28+
29+
- name: Install modules
30+
run: npm ci
31+
32+
- name: Check the coding style
33+
run: npm run lint && npm run prettier
34+
35+
- name: Execute integration test
36+
run: npm run test
2037

2138
build-full-ingestion:
2239
name: Build the application for full-ingestion
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
3+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
displayName: 'Tests Javascript Application - Service',
3+
moduleDirectories: ['node_modules', 'src'],
4+
testMatch: ['**/tests/**/*.js?(x)', '**/?(*.)+(spec|test).js?(x)'],
5+
testEnvironment: 'node',
6+
verbose: true,
7+
silent: true,
8+
};

0 commit comments

Comments
 (0)