Skip to content

Commit 95e196b

Browse files
Merge pull request #98 from cashfree/PA-11727-add-scripts-for-v5
PA-11727 Added testscripts for SDK V5.0.3
2 parents 1474005 + 4bd2018 commit 95e196b

File tree

6 files changed

+302
-579
lines changed

6 files changed

+302
-579
lines changed

.github/workflows/run-tests.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,21 @@ on:
88

99
jobs:
1010
build:
11-
1211
runs-on: ubuntu-latest
12+
env:
13+
XCLIENTIDSANDBOX: ${{ secrets.XCLIENTIDSANDBOX }}
14+
XCLIENTSECRETSANDBOX: ${{ secrets.XCLIENTSECRETSANDBOX }}
1315

1416
steps:
1517
- uses: actions/checkout@v4
18+
1619
- name: Use Node.js
1720
uses: actions/setup-node@v3
1821
with:
1922
node-version: '21.x'
23+
2024
- name: Install dependencies
21-
run: npm install && npm install coveralls --save-dev
25+
run: npm install
26+
2227
- name: Run Tests
23-
run: CLIENT_ID=$PG_CLIENT_ID SECRET_KEY=$PG_CLIENT_SECRET npm test && cd coverage && ls && cd .. && cat coverage/lcov.info | npx coveralls
24-
env:
25-
PG_CLIENT_ID: ${{ secrets.XCLIENTIDSANDBOX }}
26-
PG_CLIENT_SECRET: ${{ secrets.XCLIENTSECRETSANDBOX }}
27-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
28+
run: npm test

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ typings
44
dist
55
coverage
66
package-lock.json
7-
test-results
7+
test-results
8+
.env
9+
.env/

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ module.exports = {
22
preset: "ts-jest",
33
testEnvironment: "node",
44
coverageReporters: ["lcov"],
5+
testPathIgnorePatterns: [".*\\.test\\.ts$"], // ignore TypeScript tests
56
};

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
"scripts": {
2323
"build": "tsc && tsc -p tsconfig.esm.json",
2424
"prepare": "npm run build",
25-
"test": "jest --coverage && coveralls < coverage/lcov.info"
25+
"test": "jest"
2626
},
2727
"dependencies": {
28-
"axios": "1.7.7",
29-
"@sentry/node": "^7.73.0"
28+
"@sentry/node": "^7.73.0",
29+
"axios": "1.7.7"
3030
},
3131
"devDependencies": {
3232
"@types/chai": "^4.3.10",
@@ -39,6 +39,7 @@
3939
"mocha-junit-reporter": "^2.2.1",
4040
"sinon": "^17.0.1",
4141
"ts-jest": "^29.1.1",
42-
"typescript": "^4.9.5"
42+
"typescript": "^4.9.5",
43+
"dotenv": "^16.5.0"
4344
}
4445
}

0 commit comments

Comments
 (0)